comparison lisp/help-fns.el @ 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 633a50c4a255
children 364b2ff35290
comparison
equal deleted inserted replaced
85428:ad84adc0e027 85429:f11bfc50b5be
250 file-name))) 250 file-name)))
251 251
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)
262 (symbol-function real-function) 265 (symbol-function real-function)
263 function)) 266 function))