* Let clause with defvar
@ 2024-09-04 0:49 Heime
2024-09-05 10:32 ` Philip Kaludercic
0 siblings, 1 reply; 3+ messages in thread
From: Heime @ 2024-09-04 0:49 UTC (permalink / raw)
To: Heime via Users list for the GNU Emacs text editor
Consider two versions of setting xiakos. The let defines local bindings.
Can the let block be placed outside a defvar or inside. Does it make a
difference ? Although defvar is used to define global variables, can it
be used to evaluating local bindings like let ? Which version would one
suggest ?
(let ( (orella-waypt
(questor-path-snip marshal-waypt "orella")) )
(defvar xiakos
`( ("GLXKS" . ,(concat orella-waypt "/xiakos"))
("GLXKS" . ,(concat orella-waypt "/xiakos")) ))
and
(defvar xiakos
(let ( (orella-waypt (questor-path-snip marshal-waypt "orella")) )
`( ("GLXKS" . ,(concat orella-waypt "/xiakos"))
("GLXKS" . ,(concat orella-waypt "/xiakos")) ))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Let clause with defvar
2024-09-04 0:49 Let clause with defvar Heime
@ 2024-09-05 10:32 ` Philip Kaludercic
2024-09-05 11:33 ` Heime
0 siblings, 1 reply; 3+ messages in thread
From: Philip Kaludercic @ 2024-09-05 10:32 UTC (permalink / raw)
To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor
Heime <heimeborgia@protonmail.com> writes:
> Consider two versions of setting xiakos. The let defines local bindings.
> Can the let block be placed outside a defvar or inside. Does it make a
> difference ? Although defvar is used to define global variables, can it
> be used to evaluating local bindings like let ? Which version would one
> suggest ?
>
> (let ( (orella-waypt
> (questor-path-snip marshal-waypt "orella")) )
>
> (defvar xiakos
> `( ("GLXKS" . ,(concat orella-waypt "/xiakos"))
> ("GLXKS" . ,(concat orella-waypt "/xiakos")) ))
>
> and
>
> (defvar xiakos
>
> (let ( (orella-waypt (questor-path-snip marshal-waypt "orella")) )
>
> `( ("GLXKS" . ,(concat orella-waypt "/xiakos"))
> ("GLXKS" . ,(concat orella-waypt "/xiakos")) ))
I'd place the `let' inside the `defvar', because it makes it easier to
evaluate the value manually without changing the value of the variable.
--
Philip Kaludercic on siskin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Let clause with defvar
2024-09-05 10:32 ` Philip Kaludercic
@ 2024-09-05 11:33 ` Heime
0 siblings, 0 replies; 3+ messages in thread
From: Heime @ 2024-09-05 11:33 UTC (permalink / raw)
To: Philip Kaludercic; +Cc: Heime via Users list for the GNU Emacs text editor
On Thursday, September 5th, 2024 at 10:32 PM, Philip Kaludercic <philipk@posteo.net> wrote:
> Heime heimeborgia@protonmail.com writes:
>
> > Consider two versions of setting xiakos. The let defines local bindings.
> > Can the let block be placed outside a defvar or inside. Does it make a
> > difference ? Although defvar is used to define global variables, can it
> > be used to evaluating local bindings like let ? Which version would one
> > suggest ?
> >
> > (let ( (orella-waypt
> > (questor-path-snip marshal-waypt "orella")) )
> >
> > (defvar xiakos
> > `( ("GLXKS" . ,(concat orella-waypt "/xiakos"))
> > ("GLXKS" . ,(concat orella-waypt "/xiakos")) ))
> >
> > and
> >
> > (defvar xiakos
> >
> > (let ( (orella-waypt (questor-path-snip marshal-waypt "orella")) )
> >
> > `( ("GLXKS" . ,(concat orella-waypt "/xiakos"))
> > ("GLXKS" . ,(concat orella-waypt "/xiakos")) ))
>
>
> I'd place the `let' inside the` defvar', because it makes it easier to
> evaluate the value manually without changing the value of the variable.
Can you clarify what you are talking about ? What would one want to evaluate ?
> --
> Philip Kaludercic on siskin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-05 11:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-04 0:49 Let clause with defvar Heime
2024-09-05 10:32 ` Philip Kaludercic
2024-09-05 11:33 ` Heime
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.