bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#59333: [PATCH] Define macro dlet*


From: Jean Louis
Subject: bug#59333: [PATCH] Define macro dlet*
Date: Sat, 19 Nov 2022 07:37:31 +0300
User-agent: Mutt/2.2.7+37 (a90f69b) (2022-09-02)

* Daan Ro <daanturo@gmail.com> [2022-11-17 10:42]:
> > dlet was new in Emacs 28, and the change you mention was done before
> > Emacs 28 was released.  So NEWS just mentions the introduction of
> > dlet, and that is enough.
> 
> Sorry it was my fault for not paying attention to the commit year (I thought
> that was August this year).
> 
> Therefore reverting it now must not be an option.
> 
> But I think let* is more useful than let in general for programming,
> as it let us create successive bindings and transform the flow of
> data, like the natural flow of thought.

In some cases I use `dlet' within my 'let*' to make certain
variables to be global as those variables are not found in the
main code, but in the external text. Those two functions are not
interchangeable for me. Replacing them does not work.

Example is below:

(let* ((text (rcd-dlet ((hs::id id)
                        (hs::uuid (hyperscope-uuid id))) 
               (rcd-template-eval text '("⟦" "⟧")))))
  (continue...))

There are three parts: main code, template and text. Main code
does the template interpolation by using text.

As text is separate from code and from the template, the main
code cannot know what exactly is evaluated during template
interpolation. Thus using lexical binding does not work well with
externally evaluated code.

--
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/







reply via email to

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