1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(describe-function-1): Don't use the advice origname

if it has no function definition yet.
This commit is contained in:
Richard M. Stallman 2007-10-19 01:12:43 +00:00
parent bd31647430
commit dd3f89d717

View 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)