From: Jean Louis <bugs@gnu.support>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Mattias Engdegård" <mattiase@acm.org>,
"Stefan Monnier" <monnier@iro.umontreal.ca>,
emacs-devel@gnu.org
Subject: Re: master b72f885: Make dlet work like let, not let*
Date: Mon, 20 Sep 2021 19:56:33 +0300 [thread overview]
Message-ID: <YUi9QcB9ekynBy3E@protected.localdomain> (raw)
In-Reply-To: <83wnp5m9i5.fsf@gnu.org>
* 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/
next prev parent reply other threads:[~2021-09-20 16:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-01 16:10 master b72f885: Make dlet work like let, not let* Eli Zaretskii
2021-08-03 13:03 ` Mattias Engdegård
2021-08-03 13:33 ` Eli Zaretskii
2021-08-03 15:21 ` Mattias Engdegård
2021-08-03 15:58 ` Eli Zaretskii
2021-08-03 17:19 ` Stefan Monnier
2021-08-03 17:50 ` Eli Zaretskii
2021-08-03 18:50 ` Stefan Monnier
2021-08-04 11:27 ` Eli Zaretskii
2021-08-04 11:35 ` Lars Ingebrigtsen
2021-08-04 11:46 ` Mattias Engdegård
2021-08-04 12:16 ` Eli Zaretskii
2021-08-04 12:48 ` Mattias Engdegård
2021-08-04 12:15 ` Eli Zaretskii
2021-08-04 3:09 ` Michael Heerdegen
2021-08-04 11:40 ` Eli Zaretskii
2021-09-20 17:08 ` Jean Louis
2021-09-20 17:02 ` Jean Louis
2021-09-20 16:56 ` Jean Louis [this message]
2021-09-20 19:16 ` Tassilo Horn
2021-09-21 4:19 ` Jean Louis
2021-09-21 6:31 ` Tassilo Horn
2021-09-21 7:17 ` Jean Louis
2021-09-21 7:50 ` Tassilo Horn
2021-09-21 9:31 ` Jean Louis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YUi9QcB9ekynBy3E@protected.localdomain \
--to=bugs@gnu.support \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=mattiase@acm.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.