[Top][All Lists]

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

Re: [nongnu] elpa/geiser bb9d5cb200: geiser-impl--normalize-method: quic

From: Stefan Monnier
Subject: Re: [nongnu] elpa/geiser bb9d5cb200: geiser-impl--normalize-method: quick fix for previous change
Date: Fri, 28 Jan 2022 15:16:37 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>      (let ((v (cadr m)))
> -      (if (functionp v) m
> -        `(,(car m)
> -          ,(lambda (&rest _) v))))))
> +      (if (functionp v) m `(,(car m) (lambda (&rest _) ,v))))))

But this reintroduces the use of a list-that-looks-like-a-function
instead of a true function.

BTW, one difference I can see is that the new code will basically pass
`v` to `eval` whereas the code I had sent considers `v` to be
a value already.

So maybe the code I should have sent is along the lines of the
patch below?


diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el
index 53a7a824c3..3bc5af5e55 100644
--- a/elisp/geiser-impl.el
+++ b/elisp/geiser-impl.el
@@ -158,7 +158,7 @@ in order to determine its scheme flavour."
              (= 2 (length m))
              (symbolp (car m)))
     (let ((v (cadr m)))
-      (if (functionp v) m `(,(car m) (lambda (&rest _) ,v))))))
+      (if (functionp v) m `(,(car m) ,(lambda (&rest _) (eval v t)))))))
 (defun geiser-impl--define (file name parent methods)
   (let* ((methods (mapcar #'geiser-impl--normalize-method methods))

reply via email to

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