aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Wiegley2001-04-24 06:33:40 +0000
committerJohn Wiegley2001-04-24 06:33:40 +0000
commitc7b1b508e5f614daf0a06ea15d01928d6a303517 (patch)
tree18ed2b2e5fba3dddd907b4488dd5d7ade1d6e1fa
parentef59cfc6638a8ac3fccbee88482d142e95c32f81 (diff)
downloademacs-c7b1b508e5f614daf0a06ea15d01928d6a303517.tar.gz
emacs-c7b1b508e5f614daf0a06ea15d01928d6a303517.zip
(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 78321bfc852..86e4a9d6154 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,16 @@
12001-04-23 John Wiegley <johnw@gnu.org> 12001-04-23 John Wiegley <johnw@gnu.org>
2 2
3 * eshell/em-unix.el (eshell/diff): Fixed problems that were
4 occurring with Emacs 21's diff.el/compile.el interaction layer.
5
62001-04-23 Colin Walters <walters@cis.ohio-state.edu>
7
8 * eshell/esh-cmd.el (eshell-find-alias-function): Return t in the
9 case where the function was defined in a file, but not part of an
10 eshell module.
11
122001-04-23 John Wiegley <johnw@gnu.org>
13
3 * eshell/em-smart.el (eshell-smart-redisplay): Added some safety 14 * eshell/em-smart.el (eshell-smart-redisplay): Added some safety
4 code to work around a redisplay problem I've been having. 15 code to work around a redisplay problem I've been having.
5 16
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index 7d5a53625f5..24b51a1f6b8 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."
1284(defun eshell-find-alias-function (name) 1284(defun eshell-find-alias-function (name)
1285 "Check whether a function called `eshell/NAME' exists." 1285 "Check whether a function called `eshell/NAME' exists."
1286 (let* ((sym (intern-soft (concat "eshell/" name))) 1286 (let* ((sym (intern-soft (concat "eshell/" name)))
1287 (file (symbol-file sym)) 1287 (file (symbol-file sym)))
1288 module-sym) 1288 ;; If the function exists, but is defined in an eshell module
1289 ;; that's not currently enabled, don't report it as found
1289 (if (and file 1290 (if (and file
1290 (string-match "\\(em\\|esh\\)-\\(.*\\)\\(\\.el\\)?\\'" file)) 1291 (string-match "\\(em\\|esh\\)-\\(.*\\)\\(\\.el\\)?\\'" file))
1291 (setq file (concat "eshell-" (match-string 2 file)))) 1292 (let ((module-sym
1292 (setq module-sym
1293 (and sym file (fboundp 'symbol-file)
1294 (intern (file-name-sans-extension 1293 (intern (file-name-sans-extension
1295 (file-name-nondirectory file))))) 1294 (file-name-nondirectory
1296 (and sym (functionp sym) 1295 (concat "eshell-" (match-string 2 file)))))))
1297 (or (not module-sym) 1296 (if (and (eshell-using-module module-sym)
1298 (eshell-using-module module-sym) 1297 (memq module-sym (eshell-subgroups 'eshell)))
1299 (memq module-sym (eshell-subgroups 'eshell))) 1298 sym))
1300 sym))) 1299 ;; Otherwise, if it's bound, return it.
1300 (if (functionp sym)
1301 sym))))
1301 1302
1302(defun eshell-plain-command (command args) 1303(defun eshell-plain-command (command args)
1303 "Insert output from a plain COMMAND, using ARGS. 1304 "Insert output from a plain COMMAND, using ARGS.