[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Redundant (harmful) duplication of run-hooks in define-globalized-mi
From: |
Stefan Monnier |
Subject: |
Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch] |
Date: |
Mon, 14 Jan 2013 21:12:15 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> ! (add-hook 'after-change-major-mode-hook
> ! ',MODE-enable-in-buffers)
> ! (add-hook 'change-major-mode-after-body-hook
> ',MODE-enable-in-buffers)
> (add-hook 'find-file-hook ',MODE-check-buffers)
> (add-hook 'change-major-mode-hook ',MODE-cmhh))
> --- 399,407 ----
> ;; Setup hook to handle future mode changes and new buffers.
> (if ,global-mode
> (progn
> ! (add-hook ',(if call-before-hook
> ! 'change-major-mode-after-body-hook
> ! 'after-change-major-mode-hook)
I think we first need to understand why we currently use both.
Also, the MODE-enable-in-buffers function should enable the mode only
once, normally, even if called via both hooks.
So if you see a problem, maybe it's because (eq ,MODE-major-mode
major-mode) is not true the second time around, i.e. because
`major-mode' has changed between the two hooks. Is that the case?
If so, why?
Stefan
- Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode, Alan Mackenzie, 2013/01/13
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode, Dmitry Gutov, 2013/01/13
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch], Alan Mackenzie, 2013/01/14
- emacs24/auctex bug, Camm Maguire, 2013/01/14
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch],
Stefan Monnier <=
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch], Alan Mackenzie, 2013/01/15
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch], João Távora, 2013/01/17
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch], Alan Mackenzie, 2013/01/17
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch], Stefan Monnier, 2013/01/17
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch], João Távora, 2013/01/18
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch], Alan Mackenzie, 2013/01/18
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch-2], Alan Mackenzie, 2013/01/31
- Re: Redundant (harmful) duplication of run-hooks in define-globalized-minor-mode [patch-2], Stefan Monnier, 2013/01/31