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: uzibalqa
Subject: RE: [External] : Saving variables for use between emacs sessions
Date: Fri, 16 Sep 2022 02:40:57 +0000

------- Original Message -------
On Friday, September 16th, 2022 at 2:19 AM, Drew Adams <drew.adams@oracle.com> 
wrote:


> > > Just define the option with defcustom.
> > > 
> > > Users can use Customize to change the
> > > value and save that new setting to their
> > > `custom-file' or init file. Or they can use` custom*' functions to
> > > set and to save. Or you can use such
> > > functions to do that for them "in an
> > > automatic way".
> > > 
> > > Just look into what's available - it's
> > > all there. You, yourself, can easily
> > > check it out.
> > 
> > I have coded as follows
> > (defgroup tpframe-pos nil
> > "Set position of frame."
> > :group 'convenience)
> > (defcustom tpfxpos 8
> > "X position of initial frame."
> > :group 'tpframe-pos :type 'integer)
> > (defcustom tpfypos 8
> > "Y position of initial frame."
> > :group 'tpframe-pos :type 'integer)
> > 
> > Then I have a function that changes the values with
> > (setq tpfxpos nlft) and (setq tpfypos ntop)
> 
> 
> What part of this:
> 
> > > use `custom*' functions to set and to save.
> 
> ^^^^^^^^^ ^^^^
> 
> did you not understand? Or did you just ignore
> it all?
> 
> Do you think `setq' is a` custom*' function?
> Do you think it saves the variable value
> persistently?

I do not understand.  Once I define a variable with the declaration "defcustom",
how can I make a function change the value?




reply via email to

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