help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Generality of defvar


From: carlmarcos
Subject: Re: Generality of defvar
Date: Wed, 27 Jul 2022 01:10:31 +0200 (CEST)

Jul 26, 2022, 23:01 by philipk@posteo.net:

> carlmarcos--- via Users list for the GNU Emacs text editor
> <help-gnu-emacs@gnu.org> writes:
>
>> Have been looking into defvar and noticed the generality of its use
>>
>> (defvar aname t)
>> (defvar bname nil)
>> (defvar cname 1)
>> (defvar dname "text")
>>
>> Then I can do
>>
>> (when aname (setq debug-on-error t))
>> (when bname (setq debug-on-error nil))
>>
>> Is this correct?
>>
>
> You can /do/ it, but what do you /want/ to archive?
>
Want to use a defvar to enable or disable some functionality using `when', such 
as enabling error diagnostics with the command  

(when myopt (setq debug-on-error t))






reply via email to

[Prev in Thread] Current Thread [Next in Thread]