From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: "Chong Yidong" <cyd@gnu.org>,
emacs-devel@gnu.org, "Leo Liu" <sdl.web@gmail.com>,
"João Távora" <joaotavora@gmail.com>
Subject: Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch-2]
Date: Fri, 1 Feb 2013 15:44:53 +0000 [thread overview]
Message-ID: <20130201154453.GA23075@acm.acm> (raw)
In-Reply-To: <jwvk3qtju5v.fsf-monnier+emacs@gnu.org>
Hi, Stefan.
On Thu, Jan 31, 2013 at 09:38:31AM -0500, Stefan Monnier wrote:
> > + (MODE-cancel-disable
> > + (intern (concat global-mode-name "-cancel-disable")))
> > + (MODE-disable-in-buffer
> > + (intern (concat global-mode-name "-disable-in-buffer")))
> If you defvar-local the MODE-disable-in-buffer, .....
That would be disable-MODE I think you meant. Yes, I've now made
disable-MODE buffer local. It has to be buffer local, considering the
way that MODE-enable-in-buffers checks all buffers each time it runs.
> .... then you shouldn't need MODE-cancel-disable since
> kill-all-local-variables will have reset MODE-disable-in-buffer to nil
> already.
I'm not so sure about this. These complicated structures of macros and
hooks and generated functions are making my head hurt. ;-( Are you
sure there are no ways of invoking this which won't bypass
kill-all-local-variables? (That's a real question, not a rhetorical
one.)
Another thought. As I've coded it up, the disable-MODE flag, once it
becomes t, stays t (upto the next major mode change). However, running
global-MODE still enables MODE on this buffer. Should we worry about
this? I don't think we need to.
[Amended patch not included.]
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2013-02-01 15:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-13 19:28 Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode Alan Mackenzie
2013-01-13 20:48 ` Dmitry Gutov
2013-01-14 16:30 ` Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch] Alan Mackenzie
2013-01-14 16:52 ` emacs24/auctex bug Camm Maguire
2013-01-14 23:58 ` Xue Fuqiao
2013-01-15 2:12 ` Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch] Stefan Monnier
2013-01-15 14:08 ` Alan Mackenzie
2013-01-17 13:17 ` João Távora
2013-01-17 17:51 ` Alan Mackenzie
2013-01-17 18:31 ` Stefan Monnier
2013-01-18 12:07 ` João Távora
2013-01-18 17:09 ` Alan Mackenzie
2013-01-31 11:04 ` Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch-2] Alan Mackenzie
2013-01-31 14:38 ` Stefan Monnier
2013-02-01 15:44 ` Alan Mackenzie [this message]
2013-02-01 16:28 ` Stefan Monnier
2013-02-01 19:53 ` Alan Mackenzie
2013-02-01 20:09 ` Achim Gratz
2013-02-01 20:15 ` Alan Mackenzie
2013-02-01 23:17 ` Stefan Monnier
2013-02-01 23:16 ` Stefan Monnier
2013-02-03 22:14 ` Alan Mackenzie
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=20130201154453.GA23075@acm.acm \
--to=acm@muc.de \
--cc=cyd@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=joaotavora@gmail.com \
--cc=monnier@IRO.UMontreal.CA \
--cc=sdl.web@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.