emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Redundant (harmful) duplication of run-hooks in define-globalized-mi


From: João Távora
Subject: Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch]
Date: Thu, 17 Jan 2013 13:17:03 +0000

On Tue, Jan 15, 2013 at 2:08 PM, Alan Mackenzie <address@hidden> wrote:

> I think that's true.  My problem is that font-lock-mode is being called
> too soon, before the mode has been fully set up by the major mode hook.

Sorry to hijack, but I have a similiar problem in autopair and yasnippet. My
problem is that I sometimes want the minor modes never to be called at all
depending on the major-mode setup.

While the major-mode hook has a chance to disable them with (xxx-mode -1),
there's no way to use the major-mode's hook to prevent a globalized minor mode
from ever being activated in the buffer.

This is a inneficient and cumbersome for these cases:

* autopair-minor-mode crashes the system when activated with sldb-minor-mode, I
  use autopair-mode-on for this and hardcode the sldb reference there. It also
  does a lot of useless setup of keybindings etc...

* yas-minor-mode jit-loads snippets for the major mode when invoked. If its
  turned off immediately after, it loaded them too soon.

before emacs 24, I used to use xxx-dont-turn-on variables set in major mode hook
and read in the xxx-mode-on function, but I agree that isn't particularly pretty
too.

Thanks,
--
João Távora



reply via email to

[Prev in Thread] Current Thread [Next in Thread]