[Top][All Lists]

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

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

From: Emanuel Berg
Subject: Re: Using "Emacs Configure" **and** modifying .emacs
Date: Sat, 12 Aug 2017 02:15:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Drew Adams wrote:

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

I don't think it is about being difficult, or
long, rather what is the benefit?

What kind of function(s) get triggered? Is it
to ensure the new value of the variable makes
sense? That is, some variant of validating
the input?

Or is it to control behavior in a wider sense,
so that some function, that does something, is
set to something depending on the value of
the variable?

If so (the second case), I would simply have
a function, one umbrella function, that
branches depending on the variable value and
executes the desired function - i.e. no need to
change anything, but only act differently
depending on the value.

It could simply signal an error if the value
doesn't make sense, or if there is no
corresponding function to execute yet
implemented, which amounts to practically
the same.

If it is about validation, i.e. making sure the
variable value makes sense (is within some
range or have a certain type; is a member of
the input domain set) then I never bothered
with that.

Some people say you should "always" validate
input, but I never bothered. Errors come up to
surface anyway almost immediately and I never
had a problem with "ghost errors" that linger
on in the system for ages... at least none that
I'm aware of :)

underground experts united

reply via email to

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