aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Wiegley <[email protected]>2001-04-24 06:33:40 +0000
committerJohn Wiegley <[email protected]>2001-04-24 06:33:40 +0000
commitc7b1b508e5f614daf0a06ea15d01928d6a303517 (patch)
tree18ed2b2e5fba3dddd907b4488dd5d7ade1d6e1fa
parentef59cfc6638a8ac3fccbee88482d142e95c32f81 (diff)
(eshell-find-alias-function): Return t in the case where the function
was defined in a file, but not part of an eshell module.
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/eshell/esh-cmd.el23
2 files changed, 23 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 78321bfc85..86e4a9d615 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,16 @@
2001-04-23 John Wiegley <[email protected]>
+ * eshell/em-unix.el (eshell/diff): Fixed problems that were
+ occurring with Emacs 21's diff.el/compile.el interaction layer.
+
+2001-04-23 Colin Walters <[email protected]>
+
+ * eshell/esh-cmd.el (eshell-find-alias-function): Return t in the
+ case where the function was defined in a file, but not part of an
+ eshell module.
+
+2001-04-23 John Wiegley <[email protected]>
+
* eshell/em-smart.el (eshell-smart-redisplay): Added some safety
code to work around a redisplay problem I've been having.
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index 7d5a53625f..24b51a1f6b 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -1284,20 +1284,21 @@ COMMAND may result in an alias being executed, or a plain command."
(defun eshell-find-alias-function (name)
"Check whether a function called `eshell/NAME' exists."
(let* ((sym (intern-soft (concat "eshell/" name)))
- (file (symbol-file sym))
- module-sym)
+ (file (symbol-file sym)))
+ ;; If the function exists, but is defined in an eshell module
+ ;; that's not currently enabled, don't report it as found
(if (and file
(string-match "\\(em\\|esh\\)-\\(.*\\)\\(\\.el\\)?\\'" file))
- (setq file (concat "eshell-" (match-string 2 file))))
- (setq module-sym
- (and sym file (fboundp 'symbol-file)
+ (let ((module-sym
(intern (file-name-sans-extension
- (file-name-nondirectory file)))))
- (and sym (functionp sym)
- (or (not module-sym)
- (eshell-using-module module-sym)
- (memq module-sym (eshell-subgroups 'eshell)))
- sym)))
+ (file-name-nondirectory
+ (concat "eshell-" (match-string 2 file)))))))
+ (if (and (eshell-using-module module-sym)
+ (memq module-sym (eshell-subgroups 'eshell)))
+ sym))
+ ;; Otherwise, if it's bound, return it.
+ (if (functionp sym)
+ sym))))
(defun eshell-plain-command (command args)
"Insert output from a plain COMMAND, using ARGS.