]> git.eshelyaron.com Git - emacs.git/commitdiff
ad-activate-advised-definition: Use proper function objects
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 30 May 2024 22:57:56 +0000 (18:57 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sat, 1 Jun 2024 17:04:57 +0000 (19:04 +0200)
* lisp/emacs-lisp/advice.el (ad-activate-advised-definition):
Use interpreted functions rather than lambda lists.

(cherry picked from commit 2e16bcd8ede77e41e0caaf71e1d22edadadc79dd)

lisp/emacs-lisp/advice.el

index 752660156b94256ac9c40d428c26c51993b9c479..73d11fc8aa855aa6c5454e74e7642ee12d8b0b08 100644 (file)
@@ -2845,7 +2845,11 @@ The current definition and its cache-id will be put into the cache."
          (old-ispec (interactive-form advicefunname)))
     (fset advicefunname
           (or verified-cached-definition
-              (ad-make-advised-definition function)))
+              (eval
+               (ad-make-advised-definition function)
+               ;; We don't keep track of the `lexical-binding' of the
+               ;; various chunks: assume it's the old dynbound dialect.
+               nil)))
     (put advicefunname 'function-documentation
         `(ad--make-advised-docstring ',advicefunname))
     (unless (equal (interactive-form advicefunname) old-ispec)