]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve previous eshell change
authorGlenn Morris <rgm@gnu.org>
Mon, 24 Sep 2012 18:38:14 +0000 (14:38 -0400)
committerGlenn Morris <rgm@gnu.org>
Mon, 24 Sep 2012 18:38:14 +0000 (14:38 -0400)
lisp/eshell/esh-cmd.el

index 921f08e36f8bc9d3f6f31ccdfb2ecb033d20fa3d..5a10721387b758e0e14c56c8410305ca0724543e 100644 (file)
@@ -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)