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

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

Re: How can I make emacs highlight the first word of every line a partic


From: Stefan Monnier
Subject: Re: How can I make emacs highlight the first word of every line a particular color?
Date: Tue, 23 Oct 2007 21:33:05 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

>>>>> "russell" == russell friesenhahn <russell.friesenhahn@gmail.com> writes:

> I'm scripting in tcl and if emacs font lock doesn't recognize the
> first word of a line as a tcl reserved word, I'd like it to highlight
> it as something else since it is ~98% of the time a user-defined proc
> name that I wrote.  Thanks for the help in advance!

Try something like:

   (add-hook 'tcl-mode-hook
             (lambda ()
               (font-lock-add-keywords
                nil '(("^[^ \t\n]+" . font-lock-keyword-face)))))


-- Stefan


reply via email to

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