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

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

Re: writing an own version of setq?


From: Klaus Berndl
Subject: Re: writing an own version of setq?
Date: 09 Oct 2002 15:48:00 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

On Wed, 09 Oct 2002, Thomas Link wrote:



> > OK, calls like (setq-save 'klaus (+ 1 2)) work fine but I'm not really
> > satisfied because i want to write (setq-save klaus (+ 1 2)). Note the
> > missing quote! How can i achieve this?
>  
>  You could possibly replace ,option with (quote ,option) like in:
>  
>  (defmacro setq-save (option value)
>     "Sets OPTION to VALUE if and only if OPTION is not already saved by
>    customize."
>     `(and (not (custom-saved-p ,option))
>       (set (quote ,option) ,value)))
>  
>  (setq-save x 1)

Yes, (quote ...) works, thanks!


>  Setting the variable with setq or defvar is ok for you?

Hmm, what do you mean? I do not understand...

Ciao,
Klaus

-- 
Klaus Berndl                    mailto: klaus.berndl@sdm.de
sd&m AG                         http://www.sdm.de
software design & management    
Thomas-Dehler-Str. 27, 81737 M√ľnchen, Germany
Tel +49 89 63812-392, Fax -220


reply via email to

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