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

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

Re: Plain TeX mode


From: Emil Hedevang Lohse
Subject: Re: Plain TeX mode
Date: Fri, 05 Dec 2003 00:43:23 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/20.7 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> Change the font-lock-keywords patterns.  It's not very convenient,
>>> tho.
>> Can I get a hint on how to do that?
>
> In latex-mode, do C-h v font-lock-keywords RET to find the current value.
> Then in your .emacs do
>
>    (add-hook 'latex-mode-hook 'my-latex-mode-hook)
>    (defun my-latex-mode-hook ()
>      ;; (font-lock-mode 1)
>      (setq font-lock-keywords <the-changed-value>))

I thank you for the reply. The keyword "font-lock-keywords" helped me
find the right pages in the help system, and so after a few tries I
came up with the following code which seems to do the job.

(add-hook 'tex-mode-hook 'my-tex-mode-hook)
(defun my-tex-mode-hook ()
  (font-lock-add-keywords nil
                          '(("\\\\[a-zA-Z@æøåÆØÅ]+" . font-lock-keyword-face))
                          ))

> Oh, I see, so it's not part of what the `inputenc' package does.

I cannot remember, quite some time has passed since I last used LaTeX.

Regards,

-- 
Emil Hedevang Lohse <http://home.imf.au.dk/emil/> 

Alle spørgsmål er lige dumme. 
Og spørgsmålet "Kan ænder flyve?" er ikke dumt.


reply via email to

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