Mercurial > emacs
changeset 85429:f11bfc50b5be
(describe-function-1): Don't use the advice origname
if it has no function definition yet.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 19 Oct 2007 01:12:43 +0000 |
parents | ad84adc0e027 |
children | 364b2ff35290 |
files | lisp/help-fns.el |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/help-fns.el Thu Oct 18 22:49:05 2007 +0000 +++ b/lisp/help-fns.el Fri Oct 19 01:12:43 2007 +0000 @@ -252,10 +252,13 @@ ;;;###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)