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: Tue, 21 Sep 2021 07:19:23 +0300
User-agent: Mutt/2.0.7+183 (3d24855) (2021-05-28)

* Tassilo Horn <tsdh@gnu.org> [2021-09-20 22:31]:
> Jean Louis <bugs@gnu.support> writes:
> 
> > 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:
> 
> Being able to refer to variables earlier in the same binding form has
> nothing do with dynamic binding.  `let' and `dlet' don't support that,
> `let*' does, and as Mattias said, there could be a `dlet*' if someone
> needs it.
> 
> What dlet allows you is to bind variables dynamically which are no
> special variable (are not declared with defvar).  For example:
> 
> --8<---------------cut here---------------start------------->8---
> (defun foo ()
>   some-var)
> 
> (foo) ;; Lisp error: (void-variable some-var)
> 
> (dlet ((some-var 17))
>   (foo)) ;=> 17
> --8<---------------cut here---------------end--------------->8---

> 
> But instead of dlet you could just as well defvar some-var and use a
> normal `let' instead.
> 
> Why can't you defvar wrs::variables?  Or maybe it already is?  In that
> case, you could just replace `dlet' with `let*'.

Thanks Tassilo for the tip, though I have tried to use `defvar' and
`let*' and that does not work in my case. I cannot technically explain
it why. Practically, lexical binding script is calling in my case
dynamical binding function.

By using `defvar' and subsequently `let*' I can avoid the first error.

I cannot however get the variables to pass over to the function in
dynamical binding script `rcd-template-eval' that is supposed to work
with variables.

This worked with `dlet' before, not it does not work.

Developer changed `dlet' to fit whatever programming habits, but
deleted the functionality of `dlet*'


I really need it.



rcd-template-eval: `eval' error: (void-variable languages_extension)
for match: 'languages_extension'rcd-template-eval: `eval' error:
(void-variable areas_id) for match: 'areas_id'rcd-template-eval:
`eval' error: (void-variable pages_categories) for match:
'pages_categories'rcd-template-eval: `eval' error: (void-variable
pages_id) for match: 'pages_id'rcd-template-eval: `eval' error:
(void-variable pages_copypage) for match:
'pages_copypage'rcd-template-eval: `eval' error: (void-variable
areas_company) for match: 'areas_company'rcd-template-eval: `eval'
error: (void-variable areas_url) for match:
'areas_url'rcd-template-eval: `eval' error: (void-variable
wrs::keywords) for match: '(xml-escape
wrs::keywords)'rcd-template-eval: `eval' error: (void-variable
wrs::description) for match: '(xml-escape
wrs::description)'rcd-template-eval: `eval' error: (void-variable
wrs::description) for match: '(xml-escape
wrs::description)'rcd-template-eval: `eval' error: (void-variable
open-graph-type) for match: 'open-graph-type'rcd-template-eval: `eval'
error: (void-variable areas_url) for match:
'areas_url'rcd-template-eval: `eval' error: (void-variable
wrs::description) for match: '(xml-escape
wrs::description)'rcd-template-eval: `eval' error: (void-variable
headerstuff) for match: 'headerstuff'rcd-template-eval: `eval' error:
(void-variable after_content) for match:
'after_content'rcd-template-eval: `eval' error: (void-variable
inquiry) for match: 'inquiry'rcd-template-eval: `eval' error:
(void-variable footerstuff) for match: 'footerstuff'Invalid face
reference: mail-double-quoted-text-face




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]