* disallow font-lock-mode for a given buffer
@ 2003-05-29 0:49 James H. Cloos Jr.
0 siblings, 0 replies; 5+ messages in thread
From: James H. Cloos Jr. @ 2003-05-29 0:49 UTC (permalink / raw)
When I edit an article in gnus, font-lock-mode gets turned on in the
*Article* buffer. I suspect this is due to having (global-font-lock-
mode t) in ~/.emacs. This overrides gnus’ faces. And doesn’t look
very good doing so….
I tried the probably naïve:
(add-hook 'gnus-article-mode-hook '(font-lock-mode -1))
(add-hook 'gnus-article-edit-mode-hook '(font-lock-mode -1))
but that gave an error.
Do I have to put it in a defun to work in a hook?
Or is '() just the wrong syntax?
It’s been too long since I’ve spent any time hacking elisp; I seem to
have forgotton most of the details…. ☹
-JimC
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: disallow font-lock-mode for a given buffer
[not found] <mailman.6963.1054170284.21513.help-gnu-emacs@gnu.org>
@ 2003-05-29 8:27 ` Kai Großjohann
2003-05-29 11:13 ` James H. Cloos Jr.
[not found] ` <mailman.6982.1054207068.21513.help-gnu-emacs@gnu.org>
2003-05-31 9:23 ` Tim X
1 sibling, 2 replies; 5+ messages in thread
From: Kai Großjohann @ 2003-05-29 8:27 UTC (permalink / raw)
"James H. Cloos Jr." <cloos@jhcloos.com> writes:
> I tried the probably naïve:
>
> (add-hook 'gnus-article-mode-hook '(font-lock-mode -1))
> (add-hook 'gnus-article-edit-mode-hook '(font-lock-mode -1))
You need a function that turns off font-lock-mode:
(defun jhc-turn-off-font-lock ()
(font-lock-mode -1))
Then, add the function to the hooks:
(add-hook 'gnus-article-edit-mode-hook 'jhc-turn-off-font-lock)
Note that the article *display* is not done with font-lock.
--
This line is not blank.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: disallow font-lock-mode for a given buffer
2003-05-29 8:27 ` disallow font-lock-mode for a given buffer Kai Großjohann
@ 2003-05-29 11:13 ` James H. Cloos Jr.
[not found] ` <mailman.6982.1054207068.21513.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 5+ messages in thread
From: James H. Cloos Jr. @ 2003-05-29 11:13 UTC (permalink / raw)
>>>>> "Kai" == Kai Großjohann <kai.grossjohann@gmx.net> writes:
Kai> You need a function
Kai> Then, add the function to the hooks:
OK. I was trying for an anon function, but a defun it’ll be....
Kai> Note that the article *display* is not done with font-lock.
Unfortunately, if font-lock-mode gets turned on in -- as it is when
an article gets edited -- the colours font-lock chooses override the
ones gnus chooses. This may be specific the emacs HEAD (w/o ding HEAD).
Danke,
-JimC
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: disallow font-lock-mode for a given buffer
[not found] ` <mailman.6982.1054207068.21513.help-gnu-emacs@gnu.org>
@ 2003-05-29 11:57 ` Kai Großjohann
0 siblings, 0 replies; 5+ messages in thread
From: Kai Großjohann @ 2003-05-29 11:57 UTC (permalink / raw)
"James H. Cloos Jr." <cloos@jhcloos.com> writes:
> OK. I was trying for an anon function, but a defun it’ll be....
(add-hook 'foo-hook (lambda () ...))
That's the syntax for anonymous functions.
--
This line is not blank.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: disallow font-lock-mode for a given buffer
[not found] <mailman.6963.1054170284.21513.help-gnu-emacs@gnu.org>
2003-05-29 8:27 ` disallow font-lock-mode for a given buffer Kai Großjohann
@ 2003-05-31 9:23 ` Tim X
1 sibling, 0 replies; 5+ messages in thread
From: Tim X @ 2003-05-31 9:23 UTC (permalink / raw)
>>>>> "James" == James H Cloos <cloos@jhcloos.com> writes:
James> When I edit an article in gnus, font-lock-mode gets turned on
James> in the *Article* buffer. I suspect this is due to having
James> (global-font-lock- mode t) in ~/.emacs. This overrides
James> gnusâ faces. And doesnât look very good
James> doing soâ¦.
James> I tried the probably naïve:
James> (add-hook 'gnus-article-mode-hook '(font-lock-mode -1))
James> (add-hook 'gnus-article-edit-mode-hook '(font-lock-mode -1))
James> but that gave an error.
James> Do I have to put it in a defun to work in a hook?
James> Or is '() just the wrong syntax?
James> Itâs been too long since Iâve spent any
James> time hacking elisp; I seem to have forgotton most of the
James> detailsâ¦. â¹
GNUS has customize options for setting the amount of font locking. You
can use these configuration options to turn font locking off/on for
different parts of the gnus display (e.g. summary, article buffers or
parts of the display such as headers, quoted text, signatures
etc). maybe this will give you what you want. Try
M-x customize-group <ret> gnus <ret>
Tim
--
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you
really need to send mail, you should be able to work it out!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-05-31 9:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.6963.1054170284.21513.help-gnu-emacs@gnu.org>
2003-05-29 8:27 ` disallow font-lock-mode for a given buffer Kai Großjohann
2003-05-29 11:13 ` James H. Cloos Jr.
[not found] ` <mailman.6982.1054207068.21513.help-gnu-emacs@gnu.org>
2003-05-29 11:57 ` Kai Großjohann
2003-05-31 9:23 ` Tim X
2003-05-29 0:49 James H. Cloos Jr.
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.