unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 34073@debbugs.gnu.org, Piotr Kaznowski <piotr.kaznowski@gmail.com>
Subject: bug#34073: 26.1; Missing documentation for minor mode hook behavior
Date: Tue, 09 Jul 2019 18:35:57 -0400	[thread overview]
Message-ID: <87bly23kfm.fsf@gmail.com> (raw)
In-Reply-To: <8736jergtr.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Wed, 10 Jul 2019 00:20:00 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Piotr Kaznowski <piotr.kaznowski@gmail.com> writes:
>
>> I couldn't find essential information about minor mode hooks behavior,
>> namely that "The minor mode's hook is called both when activating and
>> deactivating the minor mode" (as stated here:
>> https://emacs.stackexchange.com/a/47092/17425).
>>
>> It isn't mentioned in the manual (sections "Minor Modes" and "Hooks"),
>> nor in the docstring for `add-hook' function.
>
> Mentioning it `add-hook' is perhaps not natural, and I don't think it's
> 100% adhered to, anyway?  Only by minor modes that are defined by
> define-minor-mode?  Other minor modes may or may not call the hook.
>
> It is mentioned in the "Defining Minor Modes" node of the Lisp
> manual...  but is probably not where people would be looking for this
> information.
>
> Hm.  Perhaps `add-hook' is the right place to mention this anyway?  But
> with caveats about, well, everything?

Maybe define-minor-mode could mention this in the mode's docstring, like
it does for the ARG?





  reply	other threads:[~2019-07-09 22:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14  9:13 bug#34073: 26.1; Missing documentation for minor mode hook behavior Piotr Kaznowski
2019-07-09 22:20 ` Lars Ingebrigtsen
2019-07-09 22:35   ` Noam Postavsky [this message]
2019-07-09 22:43     ` Lars Ingebrigtsen
2019-07-09 22:44       ` Noam Postavsky
2019-07-09 22:57         ` Lars Ingebrigtsen
2020-08-21 15:15           ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87bly23kfm.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=34073@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=piotr.kaznowski@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).