all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: 28229@debbugs.gnu.org
Subject: bug#28229: 26.0.50; outline-minor-mode-hook run twice when reverting buffer
Date: Fri, 25 Aug 2017 16:08:01 +0300	[thread overview]
Message-ID: <83o9r37q32.fsf@gnu.org> (raw)
In-Reply-To: <CAFyQvY12TV-U+tVafSaeEWj-1OqV4+DKaE8qOUf8ZEpGkG_anw@mail.gmail.com> (message from Kaushal Modi on Fri, 25 Aug 2017 12:14:23 +0000)

> From: Kaushal Modi <kaushal.modi@gmail.com>
> Date: Fri, 25 Aug 2017 12:14:23 +0000
> 
> I recently discovered an anomaly with my outline mode customization and it boiled down to this unexplained
> behavior.. the outline-minor-mode-hook was getting triggered twice on doing revert-buffer.

Isn't this expected behavior?  revert-buffer calls normal-mode, which
first kills all local variables, which involves turning off
outline-minor-mode by calling

  (outline-minor-mode -1)

And that calls your hook.

The other time is when normal-mode turns outline-minor-mode ON.

The doc string of outline-minor-mode-hook (and any other hook created
by define-minor-mode) clearly says:

  Hook run after entering or leaving ‘outline-minor-mode’.





  reply	other threads:[~2017-08-25 13:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 12:14 bug#28229: 26.0.50; outline-minor-mode-hook run twice when reverting buffer Kaushal Modi
2017-08-25 13:08 ` Eli Zaretskii [this message]
2017-08-25 15:06   ` Kaushal Modi

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=83o9r37q32.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=28229@debbugs.gnu.org \
    --cc=kaushal.modi@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 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.