]> git.eshelyaron.com Git - emacs.git/commitdiff
(describe-function-1): Don't use the advice origname
authorRichard M. Stallman <rms@gnu.org>
Fri, 19 Oct 2007 01:12:43 +0000 (01:12 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 19 Oct 2007 01:12:43 +0000 (01:12 +0000)
if it has no function definition yet.

lisp/help-fns.el

index befd83c76ef32b4a4028d4609bac1ea7457af6c8..3443cc634e0943d76d38594c5e8289475f74ef08 100644 (file)
@@ -252,10 +252,13 @@ face (according to `face-differs-from-default-p')."
 ;;;###autoload
 (defun describe-function-1 (function)
   (let* ((advised (and (featurep 'advice) (ad-get-advice-info function)))
-        ;; If the function is advised, get the symbol that has the
-        ;; real definition.
+        ;; If the function is advised, use the symbol that has the
+        ;; real definition, if that symbol is already set up.
         (real-function
-         (if advised (cdr (assq 'origname advised))
+         (or (and advised
+                  (cdr (assq 'origname advised))
+                  (fboundp (cdr (assq 'origname advised)))
+                  (cdr (assq 'origname advised)))
            function))
         ;; Get the real definition.
         (def (if (symbolp real-function)