diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2014-02-01 21:25:05 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2014-02-01 21:25:05 -0500 |
commit | 70e5a261ac4e923a09a464af9ffb9a321a42e70e (patch) | |
tree | 493a5e6d08a726ffec84754a65460d158f5684f9 /lisp/help-fns.el | |
parent | 65bc4bb587b1852eff1ac63d92f744416c3f6275 (diff) | |
download | emacs-70e5a261ac4e923a09a464af9ffb9a321a42e70e.tar.gz emacs-70e5a261ac4e923a09a464af9ffb9a321a42e70e.tar.bz2 emacs-70e5a261ac4e923a09a464af9ffb9a321a42e70e.zip |
* lisp/help-fns.el (help-C-file-name): Handle advised functions.
* lisp/emacs-lisp/find-func.el (find-function-C-source): Idem.
* lisp/emacs-lisp/nadvice.el (advice--cd*r): New function.
* help-fns.el (describe-function-1): Use it.
Fixes: debbugs:16478
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r-- | lisp/help-fns.el | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 2252c700fea..5e38de88f72 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -187,7 +187,7 @@ KIND should be `var' for a variable or `subr' for a subroutine." (let ((docbuf (get-buffer-create " *DOC*")) (name (if (eq 'var kind) (concat "V" (symbol-name subr-or-var)) - (concat "F" (subr-name subr-or-var))))) + (concat "F" (subr-name (advice--cd*r subr-or-var)))))) (with-current-buffer docbuf (goto-char (point-min)) (if (eobp) @@ -542,11 +542,7 @@ FILE is the file where FUNCTION was probably defined." ;; real definition, if that symbol is already set up. (real-function (or (and advised - (let* ((advised-fn (advice--cdr - (advice--symbol-function function)))) - (while (advice--p advised-fn) - (setq advised-fn (advice--cdr advised-fn))) - advised-fn)) + (advice--cd*r (advice--symbol-function function))) function)) ;; Get the real definition. (def (if (symbolp real-function) @@ -660,9 +656,9 @@ FILE is the file where FUNCTION was probably defined." (or doc "Not documented."))))))) ;; Add defaults to `help-fns-describe-function-functions'. -(add-hook 'help-fns-describe-function-functions 'help-fns--obsolete) -(add-hook 'help-fns-describe-function-functions 'help-fns--parent-mode) -(add-hook 'help-fns-describe-function-functions 'help-fns--compiler-macro) +(add-hook 'help-fns-describe-function-functions #'help-fns--obsolete) +(add-hook 'help-fns-describe-function-functions #'help-fns--parent-mode) +(add-hook 'help-fns-describe-function-functions #'help-fns--compiler-macro) ;; Variables |