emacs-devel
[Top][All Lists]
Advanced

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

Re: Make format-spec accept a function as the substitution


From: Stefan Kangas
Subject: Re: Make format-spec accept a function as the substitution
Date: Thu, 29 Sep 2022 05:59:48 -0700

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Code should be quoted with `lambda` (which you run with `funcall` or
> `apply`), not with `quote` (for which you need to use `eval`).
>
> So we should aim for a source code of the form:
>
>     (format-spec "Go to line %n in file %f %g"
>                  `((?n . ,(λ () (read-number "Number: ")))
>                    (?g . "now")
>                    (?f . ,(λ () (read-file-name "File: ")))))

I agree, which is why that's what my patch does.



reply via email to

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