[Top][All Lists]

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

RE: Using "Emacs Configure" **and** modifying .emacs

From: Drew Adams
Subject: RE: Using "Emacs Configure" **and** modifying .emacs
Date: Fri, 11 Aug 2017 13:46:31 -0700 (PDT)

> > There are some custom settings (I'm afraid
> > I can think of anything specific at the
> > moment) where setting them via
> > `customize-...' also triggers a setting up
> > function, which incorporates the new setting
> > into something deeper than just
> > a variable value.
> Let's see: a variable that triggers a function
> when it (the variable) is set, only that only
> works when it is set with a specific function?
> And what happens if the variable is the the
> old-fashion way? An inconsistent state as there
> is now a mismatch between the variable value
> and the un-triggered function?
> Well, hell. In my experience, bad ideas can't
> be circumvent by dealing with them the
> supposedly right way. That can only prolong the
> time before you realize it is a bad idea.

Yes, it is perhaps unfortunate that there is not a
more pervasive way to detect setting and thus trigger
application of the `:set' function.

On the other hand, this is Lisp, which means that code
can be generated and evaluated later etc., and it might
sometimes not be correct to trigger the function - at
least one can imagine that one size does not fit all

Still, I think we could improve things in this regard.
Perhaps by a symbol property that is checked when the
variable is set in any way (e.g. including by `set'
and `setq').  And perhaps by checking that some other
property or variable value does not override that
automatic set-triggering behavior.  Dunno.

But the lesson _here_ is simply that this is the way
things are, and it behooves a Lisp users to be aware
of it.  If you don't want to get bit then it is a good
idea to "deal with them the supposedly right way."

And that's not hard to do: just use `customize-variable'
instead of `setq', for user options.  How hard is that?
If you want something shorter, define an alias...

reply via email to

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