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 Monnier
Subject: Re: Make format-spec accept a function as the substitution
Date: Thu, 29 Sep 2022 12:56:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>>     (format-spec "Go to line %n in file %f %g"
>>                  `((?n . ,(λ () (read-number "Number: ")))
>>                    (?g . "now")
>>                    (?f . ,(λ () (read-file-name "File: ")))))
>
> Is there no worthwhile information to pass the lambda function?

I was talking in very general terms, not specific to `format-spec`.
You'd need someone more knowledgeable about `format-spec` to answer
your question.

> (I like the λ notation by the way, would be nice to have a (defalias 'λ
> #'lambda) in subr.el).

I use `prettify-symbols-mode` :-)


        Stefan




reply via email to

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