aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2007-10-19 01:12:43 +0000
committerRichard M. Stallman2007-10-19 01:12:43 +0000
commitdd3f89d7176b52d7c1983ce8bd91bd1d3938fd77 (patch)
treed627e11056e71ab82f74ffa7395a5255b37fcc48
parentbd3164743080f3eb5fc316aca7cc5322ca58fe33 (diff)
downloademacs-dd3f89d7176b52d7c1983ce8bd91bd1d3938fd77.tar.gz
emacs-dd3f89d7176b52d7c1983ce8bd91bd1d3938fd77.zip
(describe-function-1): Don't use the advice origname
if it has no function definition yet.
-rw-r--r--lisp/help-fns.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index befd83c76ef..3443cc634e0 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -252,10 +252,13 @@ face (according to `face-differs-from-default-p')."
252;;;###autoload 252;;;###autoload
253(defun describe-function-1 (function) 253(defun describe-function-1 (function)
254 (let* ((advised (and (featurep 'advice) (ad-get-advice-info function))) 254 (let* ((advised (and (featurep 'advice) (ad-get-advice-info function)))
255 ;; If the function is advised, get the symbol that has the 255 ;; If the function is advised, use the symbol that has the
256 ;; real definition. 256 ;; real definition, if that symbol is already set up.
257 (real-function 257 (real-function
258 (if advised (cdr (assq 'origname advised)) 258 (or (and advised
259 (cdr (assq 'origname advised))
260 (fboundp (cdr (assq 'origname advised)))
261 (cdr (assq 'origname advised)))
259 function)) 262 function))
260 ;; Get the real definition. 263 ;; Get the real definition.
261 (def (if (symbolp real-function) 264 (def (if (symbolp real-function)