don't require grep in vc-git
[bpt/emacs.git] / lisp / help-fns.el
index da4a230..248e505 100644 (file)
@@ -483,7 +483,7 @@ FILE is the file where FUNCTION was probably defined."
         (beg (if (and (or (byte-code-function-p def)
                           (keymapp def)
                           (memq (car-safe def) '(macro lambda closure)))
-                      file-name
+                      (stringp file-name)
                       (help-fns--autoloaded-p function file-name))
                  (if (commandp def)
                      "an interactive autoloaded "
@@ -501,6 +501,11 @@ FILE is the file where FUNCTION was probably defined."
                 ;; aliases before functions.
                 (aliased
                  (format "an alias for `%s'" real-def))
+                ((autoloadp def)
+                 (format "%s autoloaded %s"
+                         (if (commandp def) "an interactive" "an")
+                         (if (eq (nth 4 def) 'keymap) "keymap"
+                           (if (nth 4 def) "Lisp macro" "Lisp function"))))
                 ((or (eq (car-safe def) 'macro)
                      ;; For advised macros, def is a lambda
                      ;; expression or a byte-code-function-p, so we
@@ -513,11 +518,6 @@ FILE is the file where FUNCTION was probably defined."
                  (concat beg "Lisp function"))
                 ((eq (car-safe def) 'closure)
                  (concat beg "Lisp closure"))
-                ((autoloadp def)
-                 (format "%s autoloaded %s"
-                         (if (commandp def) "an interactive" "an")
-                         (if (eq (nth 4 def) 'keymap) "keymap"
-                           (if (nth 4 def) "Lisp macro" "Lisp function"))))
                 ((keymapp def)
                  (let ((is-full nil)
                        (elts (cdr-safe def)))