1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

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.
This commit is contained in:
Stefan Monnier 2022-06-07 10:30:47 -04:00
parent 3864308c20
commit a98413726f
2 changed files with 10 additions and 3 deletions

View file

@ -95,6 +95,13 @@ expected function symbol and function library, respectively."
(advice-remove #'mark-sexp 'my-message))
(ert-deftest find-func-tests--find-library-verbose ()
(unwind-protect
(progn
(advice-add 'dired :before #'ignore)
;; bug#41104
(should (equal (find-function-library #'dired) '(dired . "dired"))))
(advice-remove 'dired #'ignore))
(find-function-library #'join-line nil t)
(with-current-buffer "*Messages*"
(save-excursion