Commit 9a48e168 authored by Glenn Morris's avatar Glenn Morris
Browse files

Improve previous eshell change

parent 289c24bd
......@@ -1216,12 +1216,12 @@ COMMAND may result in an alias being executed, or a plain command."
(let* ((sym (intern-soft (concat "eshell/" name)))
(file (symbol-file sym 'defun)))
;; If the function exists, but is defined in an eshell module
;; that's not currently enabled, don't report it as found
;; that's not currently enabled, don't report it as found.
(if (and file
(string-match "\\(em\\|esh\\)-\\([[:alnum:]]+\\)\\(\\.elc?\\)?\\'"
file))
(setq file (file-name-base file))
(string-match "\\`\\(em\\|esh\\)-\\([[:alnum:]]+\\)\\'" file))
(let ((module-sym
(intern (file-name-base (concat "eshell-" (match-string 2 file))))))
(intern (concat "eshell-" (match-string 2 file)))))
(if (and (functionp sym)
(or (null module-sym)
(eshell-using-module module-sym)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment