* 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
This commit is contained in:
parent
65bc4bb587
commit
70e5a261ac
4 changed files with 20 additions and 12 deletions
|
@ -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))
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue