help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] Re: font lock for text mode


From: Jason Rumney
Subject: [h-e-w] Re: font lock for text mode
Date: 11 Jan 2002 21:50:45 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

"Jeff Rancier" <address@hidden> writes:

> Thanks Jason.  I have some very large log files from customers, and I
> include things like DEBUG:, NOTE:, etc. in the log file.  This way I can
> easily browse through them with markup.

I've found in the past that log file formats are best dealt by
defining new a mode using define-generic-mode. generic-mode takes
care of all the fine details of font-lock setup, and having a
separate mode means you can switch easily between different formats
if necessary.

Another thing I do sometimes with log files is customize
outline-regexp so I can hide all the lines I'm not interested in
(this is a bit of a misuse of outline-minor-mode, but it works for me).


> (add-hook 'text-mode-hook 'font-lock-mode)
> 
> Should do it, eh?

I thought so (without testing it first), but it appears not to.
I guess font-lock-mode is expecting some support that is not present
in text-mode, so even after you have defined some font-lock-keywords
it won't work. Another reason to go with define-generic-mode.

-- 
Jason Rumney





reply via email to

[Prev in Thread] Current Thread [Next in Thread]