all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: 9659-done@debbugs.gnu.org
Subject: bug#9659: 24.0.50; turn-on function of `define-globalized-minor-mode' doesn't see some hook-set vars
Date: Wed, 12 Oct 2011 08:35:27 -0400	[thread overview]
Message-ID: <jwvwrcae6ci.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CALDnm50SmKQ9xG2jNj4Rra4Y5BuMHoJ55Liwos0zubsKPNLbwQ@mail.gmail.com> ("João Távora"'s message of "Wed, 12 Oct 2011 10:16:44 +0100")

> Thanks, I'll update my extension docs accordingly!

Good, thank you,


        Stefan


> On Wed, Oct 12, 2011 at 5:39 AM, Stefan Monnier
> <monnier@iro.umontreal.ca> wrote:
>>> I don't know if this is expected behaviour, but in recent Emacs
>>> versions the following strategy to selectively deactivate a minor mode
>>> in some major mode combinations does not work anymore.  This used to
>>> work fine in Emacs 22 and 23.
>> 
>> Indeed, it's on purpose, ironically it's so that you can do what you're doing:
>> 
>> 2010-04-28  Stefan Monnier  <monnier@iro.umontreal.ca>
>> 
>>        Make it possible to locally disable a globally enabled mode.
>>        * simple.el (fundamental-mode): Run fundamental-mode-hook.
>>        * emacs-lisp/derived.el (define-derived-mode): Use fundamental-mode
>>        rather than kill-all-local-variables so it runs fundamental-mode-hook.
>>        * emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
>>        Use fundamental-mode-hook to run MODE-enable-in-buffers earlier, so
>>        that subsequent hooks get a chance to disable it.
>> 
>> I.e. with this change, you can skip dummy-mode-dont-turn-on and just do:
>> 
>>  (add-hook 'text-mode-hook #'(lambda () (dummy-mode -1)))
>>  (add-hook 'help-mode-hook #'(lambda () (dummy-mode -1)))
>> 
>> 
>> -- Stefan
>> 



> -- 
> João Távora





      parent reply	other threads:[~2011-10-12 12:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03  9:11 bug#9659: 24.0.50; turn-on function of `define-globalized-minor-mode' doesn't see some hook-set vars João Távora
2011-10-12  4:39 ` Stefan Monnier
     [not found]   ` <CALDnm50SmKQ9xG2jNj4Rra4Y5BuMHoJ55Liwos0zubsKPNLbwQ@mail.gmail.com>
2011-10-12 12:35     ` Stefan Monnier [this message]

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=jwvwrcae6ci.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=9659-done@debbugs.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.