[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Preventing toggling off minor modes in nxhtml mumamo chunks
From: |
Niels Geuts |
Subject: |
Re: Preventing toggling off minor modes in nxhtml mumamo chunks |
Date: |
Fri, 15 Aug 2008 22:01:09 -0700 (PDT) |
Niels Geuts wrote:
>> I want to use several minor modes in several nxhtml mumamo chunks, but
>> the
>> minor modes are toggled off in those chunks. What can I do to prevent
>> that?
<SNIP>
Lennart Borgman wrote:
> Look in mumamo.el. There is a comment for "Minor Mode Authors".
mumamo.el:
;;
;; * For functions entered to local hooks use this
;;
;; (put 'FUNSYM 'permanent-local-hook t)
;; (add-hook 'HOOKSYM 'FUNSYM nil t)
;;
;; where HOOKSYM is the hook and FUNSYM is the function.
This did not do the job:
(put 'linum-mode 'permanent-local-hook t)
(add-hook 'nxhtml-mode-hook 'linum-mode nil t)
But this did:
(add-hook 'after-change-major-mode-hook 'linum-mode 'auto-fill-function)
However, this solution did not work for longlines-mode, which I use as well.
I now use the following less satisfying solution:
(add-hook 'nxhtml-mode-hook 'longlines-mode)
(add-hook 'after-change-major-mode-hook 'longlines-mode)
I don't understand the difference in behaviour these two minor-modes
exhibit, but with no doubt this will be due to my limited understanding of
Emacs. Any comments would be welcomed.
Niels
--
View this message in context:
http://www.nabble.com/Preventing-toggling-off-minor-modes-in-nxhtml-mumamo-chunks-tp18977384p19008791.html
Sent from the Emacs - Help mailing list archive at Nabble.com.