* Preventing toggling off minor modes in nxhtml mumamo chunks
@ 2008-08-14 8:06 Niels Geuts
2008-08-15 0:12 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 5+ messages in thread
From: Niels Geuts @ 2008-08-14 8:06 UTC (permalink / raw)
To: Help-gnu-emacs
Hello group,
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?
For instance:
I want to use linum-mode in nxhtml mumamo mode. I added the following line
to my .emacs:
(add-hook 'nxhtml-mode-hook 'linum-mode)
This adds line numbers to xhtml code, but when I move the cursor to a
PHP-chunk, the line numbers disappear and the following message is
displayed:
"Toggling linum-mode off; better pass an explicit argument."
What can I do to prevent this toggling off?
I use Emacs 22.2.1 (i386-mingw-nt5.1.2600) on a Windows xp Professional SP 2
system
Many thanks,
Niels
--
View this message in context: http://www.nabble.com/Preventing-toggling-off-minor-modes-in-nxhtml-mumamo-chunks-tp18977384p18977384.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Preventing toggling off minor modes in nxhtml mumamo chunks
2008-08-14 8:06 Preventing toggling off minor modes in nxhtml mumamo chunks Niels Geuts
@ 2008-08-15 0:12 ` Lennart Borgman (gmail)
2008-08-16 5:01 ` Niels Geuts
0 siblings, 1 reply; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2008-08-15 0:12 UTC (permalink / raw)
To: Niels Geuts; +Cc: Help-gnu-emacs
Niels Geuts wrote:
> Hello group,
>
> 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?
>
> For instance:
>
> I want to use linum-mode in nxhtml mumamo mode. I added the following line
> to my .emacs:
>
> (add-hook 'nxhtml-mode-hook 'linum-mode)
>
> This adds line numbers to xhtml code, but when I move the cursor to a
> PHP-chunk, the line numbers disappear and the following message is
> displayed:
>
> "Toggling linum-mode off; better pass an explicit argument."
>
> What can I do to prevent this toggling off?
Look in mumamo.el. There is a comment for "Minor Mode Authors".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Preventing toggling off minor modes in nxhtml mumamo chunks
2008-08-15 0:12 ` Lennart Borgman (gmail)
@ 2008-08-16 5:01 ` Niels Geuts
2008-08-16 5:05 ` Niels Geuts
0 siblings, 1 reply; 5+ messages in thread
From: Niels Geuts @ 2008-08-16 5:01 UTC (permalink / raw)
To: Help-gnu-emacs
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-10 2:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-14 8:06 Preventing toggling off minor modes in nxhtml mumamo chunks Niels Geuts
2008-08-15 0:12 ` Lennart Borgman (gmail)
2008-08-16 5:01 ` Niels Geuts
2008-08-16 5:05 ` Niels Geuts
2009-03-10 2:32 ` Head
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.