diff options
author | Richard M. Stallman <rms@gnu.org> | 2007-10-19 01:12:43 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2007-10-19 01:12:43 +0000 |
commit | dd3f89d7176b52d7c1983ce8bd91bd1d3938fd77 (patch) | |
tree | d627e11056e71ab82f74ffa7395a5255b37fcc48 /lisp/help-fns.el | |
parent | bd3164743080f3eb5fc316aca7cc5322ca58fe33 (diff) | |
download | emacs-dd3f89d7176b52d7c1983ce8bd91bd1d3938fd77.tar.gz |
(describe-function-1): Don't use the advice origname
if it has no function definition yet.
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r-- | lisp/help-fns.el | 9 |
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')." ;;;###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) |