[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Let clause with defvar
From: |
Philip Kaludercic |
Subject: |
Re: Let clause with defvar |
Date: |
Thu, 05 Sep 2024 10:32:21 +0000 |
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