# HG changeset patch # User Richard M. Stallman # Date 1192756363 0 # Node ID f11bfc50b5be4cf00ac7baf4f5f7c8adf516e983 # Parent ad84adc0e027f010caaca18d4074a4a5da5ef9e5 (describe-function-1): Don't use the advice origname if it has no function definition yet. diff -r ad84adc0e027 -r f11bfc50b5be lisp/help-fns.el --- 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)