emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 020fd630184: Avoid using `(lambda ...) to build function values


From: Stefan Monnier
Subject: master 020fd630184: Avoid using `(lambda ...) to build function values
Date: Wed, 14 Jun 2023 17:06:45 -0400 (EDT)

branch: master
commit 020fd630184406a4e25f93e1fb2a3df77c6c9db9
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    Avoid using `(lambda ...) to build function values
    
    * lisp/emacs-lisp/nadvice.el (advice-eval-interactive-spec): Avoid
    `(lambda ...).
---
 lisp/emacs-lisp/nadvice.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el
index e6977f2012a..cd80df2c41d 100644
--- a/lisp/emacs-lisp/nadvice.el
+++ b/lisp/emacs-lisp/nadvice.el
@@ -176,7 +176,9 @@ DOC is a string where \"FUNCTION\" and \"OLDFUN\" are 
expected.")
     ;; FIXME: Despite appearances, this is not faithful: SPEC and
     ;; (advice-eval-interactive-spec SPEC) will behave subtly differently w.r.t
     ;; command-history (and maybe a few other details).
-    (call-interactively `(lambda (&rest args) (interactive ,spec) args)))
+    (call-interactively
+     ;; Sadly (lambda (&rest args) (interactive spec) args) doesn't work :-(
+     (cconv--interactive-helper (lambda (&rest args) args) spec)))
    ;; ((functionp spec) (funcall spec))
    (t (eval spec))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]