From: Ivan Shmakov <ivan@siamics.net>
To: emacs-devel@gnu.org
Subject: Re: autoload for eww-suggest-uris
Date: Fri, 06 Mar 2015 06:24:47 +0000 [thread overview]
Message-ID: <87wq2uzlqo.fsf@violet.siamics.net> (raw)
In-Reply-To: <CAAdUY-LW=zY7GghNbFCvLUt3c1Jra7115KYNpHHsLacaXF=Y9w@mail.gmail.com> (Artur Malabarba's message of "Thu, 5 Mar 2015 18:55:57 -0300")
>>>>> Artur Malabarba <bruce.connor.am@gmail.com> writes:
>>>>> "SM" == Stefan Monnier <monnier@iro.umontreal.ca> writes:
[…]
>> ;;; ~/.emacs (add-hook 'eww-suggest-uris 'some-new-function)
>> ; → (some-new-function)
>> Expected: that some-new-function /and/ all the default ones.
>> An alternative would be to use add-hook in 'eww itself, but that in
>> turn interferes with (setq eww-suggest-uris '(the-only-one)).
> According to Stefan it is a bug to define a hook with a non-nil
> initial value (see
> http://lists.gnu.org/archive/html/emacs-devel/2015-02/msg01271.html),
[AKA news:jwvd250fej3.fsf-monnier+emacs@gnu.org.]
> so using the `add-hook' in eww itself is the correct way.
How do we prevent it from interfering with an explicit ‘setq’
then?
SM> Basically, given that "unbound == nil", what is a bug is to defvar
SM> a hook with a non-nil default value, unless that hook is predefined
SM> (i. e. is never unbound).
How exactly does this affect the case when autoloads /are/
properly set up (as, I argue, they should be, assuming a proper
Emacs installation)?
> In fact, it seems that 25.1 will issue a compiler warning when a hook
> variable is given a non-nil initial value.
Rest assured I’ll promptly ignore it whenever working on my own
code.
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
next prev parent reply other threads:[~2015-03-06 6:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20150216190531.25142.72090@vcs.savannah.gnu.org>
[not found] ` <E1YNQz6-0006Yk-J9@vcs.savannah.gnu.org>
2015-02-16 20:29 ` [Emacs-diffs] master 8b36bfa 2/2: Add autoload cookie for the eww-suggest-uris variable Artur Malabarba
2015-02-17 18:55 ` autoload for eww-suggest-uris Ivan Shmakov
2015-03-05 21:55 ` Artur Malabarba
2015-03-06 6:24 ` Ivan Shmakov [this message]
2015-03-10 1:23 ` Stefan Monnier
2015-03-11 4:42 ` Ivan Shmakov
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=87wq2uzlqo.fsf@violet.siamics.net \
--to=ivan@siamics.net \
--cc=emacs-devel@gnu.org \
/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.