summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/find-func.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2022-06-07 10:30:47 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2022-06-07 10:31:17 -0400
commita98413726f5a10676f9faf4c4013ac6eaa53b42b (patch)
tree5e8647c4b0dd5e2b47ac710cbb9aba2e8f2553df /lisp/emacs-lisp/find-func.el
parent3864308c20deb69e7b75420377a3b86716215dd3 (diff)
downloademacs-a98413726f5a10676f9faf4c4013ac6eaa53b42b.tar.gz
find-func.el: Fix bug#41104
* lisp/emacs-lisp/find-func.el (find-function-advised-original): Look at the actual function definition rather than `advice--symbol-function` which sometimes returns only the advice. * test/lisp/emacs-lisp/find-func-tests.el (find-func-tests--find-library-verbose): Add test.
Diffstat (limited to 'lisp/emacs-lisp/find-func.el')
-rw-r--r--lisp/emacs-lisp/find-func.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index 96eaf1ab642..2dec51dd044 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -270,7 +270,7 @@ If FUNC is not a symbol, return it. Else, if it's not advised,
return the symbol's function definition."
(or (and (symbolp func)
(featurep 'nadvice)
- (let ((ofunc (advice--symbol-function func)))
+ (let ((ofunc (symbol-function func)))
(if (advice--p ofunc)
(advice--cd*r ofunc)
ofunc)))
@@ -516,8 +516,8 @@ Return t if any PRED returns t."
(defun find-function-library (function &optional lisp-only verbose)
"Return the pair (ORIG-FUNCTION . LIBRARY) for FUNCTION.
-ORIG-FUNCTION is the original name, after removing all advice and
-resolving aliases. LIBRARY is an absolute file name, a relative
+ORIG-FUNCTION is the original name, after resolving aliases.
+LIBRARY is an absolute file name, a relative
file name inside the C sources directory, or a name of an
autoloaded feature.