* How to turn off font-lock-mode with a local variable
@ 2012-07-09 18:48 Enda
2012-07-09 20:23 ` Drew Adams
0 siblings, 1 reply; 4+ messages in thread
From: Enda @ 2012-07-09 18:48 UTC (permalink / raw)
To: help-gnu-emacs@gnu.org
[-- Attachment #1: Type: text/plain, Size: 476 bytes --]
The following when at the end of a file does not turn off font-lock-mode when visiting a file:
;; Local Variables:
;; eval: (lisp-mode)
;; eval: (font-lock-mode -1)
;; End:
How do I turn off font-lock-mode per file then?
Best wishes,
Enda
This doesn't work either (even though I do not want to turn off font-lock globally, just for the file that I am visiting):
;; Local Variables:
;; eval: (lisp-mode)
;; eval: (global-font-lock-mode -1)
;; End:
[-- Attachment #2: Type: text/html, Size: 2065 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: How to turn off font-lock-mode with a local variable
2012-07-09 18:48 How to turn off font-lock-mode with a local variable Enda
@ 2012-07-09 20:23 ` Drew Adams
2012-07-09 20:28 ` Enda
0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2012-07-09 20:23 UTC (permalink / raw)
To: 'Enda', help-gnu-emacs
> The following when at the end of a file does not turn off
> font-lock-mode when visiting a file:
>
> ;; Local Variables:
> ;; eval: (lisp-mode)
> ;; eval: (font-lock-mode -1)
> ;; End:
>
> How do I turn off font-lock-mode per file then?
>
> This doesn't work either (even though I do not want to turn
> off font-lock globally, just for the file that I am visiting):
>
> ;; Local Variables:
> ;; eval: (lisp-mode)
> ;; eval: (global-font-lock-mode -1)
> ;; End:
See the Emacs manual, node `Font Lock'.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to turn off font-lock-mode with a local variable
2012-07-09 20:23 ` Drew Adams
@ 2012-07-09 20:28 ` Enda
2012-07-09 20:53 ` Drew Adams
0 siblings, 1 reply; 4+ messages in thread
From: Enda @ 2012-07-09 20:28 UTC (permalink / raw)
To: Drew Adams, help-gnu-emacs@gnu.org
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]
I want to disable font-lock-mode using Local Variables, and the obvious way does not work.
- Enda
________________________________
From: Drew Adams <drew.adams@oracle.com>
To: 'Enda' <enda_k2@yahoo.com>; help-gnu-emacs@gnu.org
Sent: Monday, July 9, 2012 9:23 PM
Subject: RE: How to turn off font-lock-mode with a local variable
> The following when at the end of a file does not turn off
> font-lock-mode when visiting a file:
>
> ;; Local Variables:
> ;; eval: (lisp-mode)
> ;; eval: (font-lock-mode -1)
> ;; End:
>
> How do I turn off font-lock-mode per file then?
>
> This doesn't work either (even though I do not want to turn
> off font-lock globally, just for the file that I am visiting):
>
> ;; Local Variables:
> ;; eval: (lisp-mode)
> ;; eval: (global-font-lock-mode -1)
> ;; End:
See the Emacs manual, node `Font Lock'.
[-- Attachment #2: Type: text/html, Size: 1670 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: How to turn off font-lock-mode with a local variable
2012-07-09 20:28 ` Enda
@ 2012-07-09 20:53 ` Drew Adams
0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2012-07-09 20:53 UTC (permalink / raw)
To: 'Enda', help-gnu-emacs
(Please use plain text for this mailing list.)
> I want to disable font-lock-mode using Local Variables,
> and the obvious way does not work.
>
>> The following when at the end of a file does not turn off
>> font-lock-mode when visiting a file:
>>
>> ;; Local Variables:
>> ;; eval: (lisp-mode)
>> ;; eval: (font-lock-mode -1)
>> ;; End:
FWIW, what you tried works for me, in Emacs 24.1. What is your Emacs version?
Try also this (same as what you tried, except for the major-mode part):
;; Local Variables:
;; mode: lisp
;; eval: (font-lock-mode -1)
;; End:
See (emacs) `Specifying File Variables'.
But neither form seems to work in Emacs 22.3 or 23.3. Perhaps someone else has
a suggestion.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-09 20:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-09 18:48 How to turn off font-lock-mode with a local variable Enda
2012-07-09 20:23 ` Drew Adams
2012-07-09 20:28 ` Enda
2012-07-09 20:53 ` Drew Adams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).