emacs-devel
[Top][All Lists]
Advanced

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

Re: master b72f885: Make dlet work like let, not let*


From: Jean Louis
Subject: Re: master b72f885: Make dlet work like let, not let*
Date: Mon, 20 Sep 2021 19:56:33 +0300
User-agent: Mutt/2.0.7+183 (3d24855) (2021-05-28)

* Eli Zaretskii <eliz@gnu.org> [2021-08-01 19:11]:
> > branch: master
> > commit b72f88518b89560accf740a4548368863e6238e0
> > Author: Mattias Engdegård <mattiase@acm.org>
> > Commit: Mattias Engdegård <mattiase@acm.org>
> > 
> >     Make dlet work like let, not let*
> >     
> >     Change `dlet` so that it has binding semantics like `let` because that
> >     is what a user would expect and it allows a corresponding `dlet*` to
> >     be added later should the need arise.  Fortunately the change has no
> >     effect where it is currently used.

I am user and I do not expect it to work as `let' because `dlet' is
supposed to make temporarily global variables. Now it doesn't work:

(dlet ((wrs::variables (make-hash-table :test 'equal))
       (wrs::_ (puthash "areas_name" "Hyperscope" wrs::variables)))
  )

error: let: Symbol’s value as variable is void: wrs::variables

That is IMHO wrong, as it is supposed to bind variables
dynamically:

,----
| -- Special Form: dlet (bindings...) forms...
|     This special form is like ‘let’, but it binds all variables
|     dynamically.  This is rarely useful—you usually want to bind normal
|     variables lexically, and special variables (i.e., variables that
|     are defined with ‘defvar’) dynamically, and this is what ‘let’
|     does.
`----

My understanding is that `wrs::variables' should be available in the
second line but it is not. This broke my code and I am kindly
requesting to think about it and revert it back so that it does work.

This is full code below, and it is broken since this change, kindly
reconsider it as to the meaning of `dlet' as described in the Elisp
manual as `dlet' should bind variables dynamically thus make them also
available to all subsequent lines.

        (if template
            (progn
              (dlet ((wrs::variables (make-hash-table :test 'equal))
                     (wrs::_ (puthash "areas_name" "Hyperscope" wrs::variables))
                     (wrs::title title)
                     (wrs::keywords (string-join (split-string (hlink-tags id)) 
", "))
                     (wrs::description description)
                     (wrs::_ (puthash "pages_content" (rcd-markdown text) 
wrs::variables))
                     (wrs::template (rcd-db-get-entry "templates" 
"templates_content" template hs-db))
                     (wrs::html (rcd-template-eval wrs::template '("⟦" "⟧") 
wrs::variables)))
                wrs::html))
        (rcd-mkd2html text title author date))))))


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]