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

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

RE: poor Customize [was: Trying to right-align my window on startup]


From: Drew Adams
Subject: RE: poor Customize [was: Trying to right-align my window on startup]
Date: Mon, 13 Jan 2014 09:06:12 -0800 (PST)

> > I have even suggested that the same or similar type-checking
> > and other `defcustom' features be made available (for optional
> > use) to `defvar'.  Variables that are not user options can also
> > benefit from type checking, :set triggers, etc.
> 
> Could you please elaborate on ":set triggers"?

See (elisp) `Variable Definitions'.

:set in `defcustom' specifies a function that is used to change the
option value.  It can take care of anything that needs to be done
when the value gets set.  By default (e.g., if unspecified), it
does only what `set-default' does: it sets the default value.

I used the word "trigger" loosely, to suggest that, via :set,
arbitrary code can be executed whenever the option value is set.

There are other, similar `defcustom' keywords.  In particular,
:initialize.



reply via email to

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