emacs-devel
[Top][All Lists]
Advanced

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

Re: [elpa] master 9173a44 1/2: [Fix #12] Don't autodisable beacon on hl-


From: Kaushal Modi
Subject: Re: [elpa] master 9173a44 1/2: [Fix #12] Don't autodisable beacon on hl-line-mode
Date: Mon, 19 Oct 2015 10:00:50 -0400

I was looking for more info on defcustom vs setq and I was surprised
to find subjective text written in first person (like a personal blog)
in the GNU Emacs manual. I have yet to check if the same is in the
Info manual too.

https://www.gnu.org/software/emacs/manual/html_node/eintr/defcustom.html

"The custom-set-variables function works somewhat differently than a
setq. While I have never learned the differences, I modify the
custom-set-variables expressions in my .emacs file by hand: I make the
changes in what appears to me to be a reasonable manner and have not
had any problems."

"Over time, I have set a considerable number of faces. Some of the
time, I re-set them using customize; other times, I simply edit the
custom-set-faces expression in my.emacs file itself."

"I myself use customize for hardly anything. Mostly, I write
expressions myself."

Who is that "I"? I think all that personal opinion text should be
removed. Correct?

--
Kaushal Modi


On Mon, Oct 19, 2015 at 9:31 AM, Stefan Monnier
<address@hidden> wrote:
>>> A custom var shouldn't be modified programmatically.
>> Out of curiosity: why?
>
> Because Custom then can't change those chunks of code in order to get
> the desired value.
>
> E.g. there's a (setq foo 4) somewhere and the user uses Custom to set
> `foo' to 3.  How is customize-save going to make sure that next time
> Emacs starts, `foo' will be set to 3 rather than 4?
>
>> I setq all my defcustoms, since I don't use Customize.
>
> As a user you're free not to (setq foo 4) in your ~/.emacs, of course,
> and since you don't use Custom, Custom won't have to try and set `foo',
> so everything's fine.  And if you do try and set `foo' via Custom, then
> Custom will rightfully complain and you'll just get what you deserve.
>
> But as a package author, such a decision is very different: using (setq
> foo 4) or add-hook in your package means that all your users will have
> problems if they try to set this var via Custom.
>
>
>         Stefan
>



reply via email to

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