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/emacs-lisp | |
parent | 65bc4bb587b1852eff1ac63d92f744416c3f6275 (diff) | |
download | emacs-70e5a261ac4e923a09a464af9ffb9a321a42e70e.tar.gz |
* 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/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/find-func.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/nadvice.el | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 31e9be81034..5c404ce0468 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -219,7 +219,7 @@ TYPE should be nil to find a function, or `defvar' to find a variable." (regexp-quote (symbol-name fun-or-var)) "\"") (concat "DEFUN[ \t\n]*([ \t\n]*\"" - (regexp-quote (subr-name fun-or-var)) + (regexp-quote (subr-name (advice--cd*r fun-or-var))) "\"")) nil t) (error "Can't find source for %s" fun-or-var)) diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index 3dfeb04a9b3..8dc1f19784c 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el @@ -67,6 +67,11 @@ Each element has the form (WHERE BYTECODE STACK) where: (defsubst advice--cdr (f) (aref (aref f 2) 2)) (defsubst advice--props (f) (aref (aref f 2) 3)) +(defun advice--cd*r (f) + (while (advice--p f) + (setq f (advice--cdr f))) + f) + (defun advice--make-docstring (function) "Build the raw docstring for FUNCTION, presumably advised." (let ((flist (indirect-function function)) |