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

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

Re: [External] : Saving variables for use between emacs sessions


From: Jean Louis
Subject: Re: [External] : Saving variables for use between emacs sessions
Date: Fri, 16 Sep 2022 10:30:00 +0300
User-agent: Mutt/+ () (2022-06-11)

* uzibalqa <uzibalqa@proton.me> [2022-09-16 05:42]:
> I do not understand.  Once I define a variable with the declaration 
> "defcustom",
> how can I make a function change the value?

Hyperbole link:
{C-h f defcustom RET}

where it says:

This macro calls ‘custom-declare-variable’.  If you want to
programmatically alter a customizable variable (for instance, to
write a package that extends the syntax of a variable), you can
call that function directly.

Hyperbole link:

{C-h f custom-declare-variable RET}

(custom-declare-variable SYMBOL DEFAULT DOC &rest ARGS)

Like ‘defcustom’, but SYMBOL and DEFAULT are evaluated as normal arguments.
DEFAULT should be an expression to evaluate to compute the default value,
not the default value itself.

That way you can programmatically change variables created by
`defcustom'.

-- 
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]