all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Marcin Borkowski <mbork@mbork.pl>
Cc: Artur Malabarba <bruce.connor.am@gmail.com>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: [elpa] master 9173a44 1/2: [Fix #12] Don't autodisable beacon on hl-line-mode
Date: Mon, 19 Oct 2015 09:31:09 -0400	[thread overview]
Message-ID: <jwvk2qj2dpw.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <877fmjflkk.fsf@mbork.pl> (Marcin Borkowski's message of "Mon, 19 Oct 2015 07:56:27 +0200")

>> 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	other threads:[~2015-10-19 13:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151017213254.5317.59042@vcs.savannah.gnu.org>
     [not found] ` <E1ZnZ5y-0001ON-4Z@vcs.savannah.gnu.org>
2015-10-18  3:20   ` [elpa] master 9173a44 1/2: [Fix #12] Don't autodisable beacon on hl-line-mode Stefan Monnier
2015-10-18 18:48     ` Artur Malabarba
2015-10-19  0:56       ` Stefan Monnier
2015-10-19  5:56         ` Marcin Borkowski
2015-10-19 13:31           ` Stefan Monnier [this message]
2015-10-19 14:00             ` Kaushal Modi
2015-10-19 14:20               ` Drew Adams
2015-10-19 14:40               ` Eli Zaretskii
2015-10-19 15:28                 ` Kaushal Modi
2015-10-19 16:19                   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvk2qj2dpw.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=bruce.connor.am@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=mbork@mbork.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.