Commit dd3f89d7 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

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

if it has no function definition yet.
parent bd316474
......@@ -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)
......
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