[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: font-lock-keywords and lines containing comments / quotes
From: |
Johan Bockgård |
Subject: |
Re: font-lock-keywords and lines containing comments / quotes |
Date: |
Fri, 26 Feb 2010 22:51:06 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.92 (gnu/linux) |
Erik Iverson <eriki@ccbr.umn.edu> writes:
> ;; syntax highlight lines that start with a "*" in the current buffer
> (font-lock-add-keywords nil
> '(("^\\*\\{1\\}.*" . font-lock-keyword-face)))
The \\{1\\} is not useful.
> As soon as I type the ; or " characters, the previous part of the line
> becomes "normal" and the comment or quote appears as it should. I
> would like for the initial part of the line to remain highlighted
> though.
Use the OVERRIDE element.
(font-lock-add-keywords
nil '(("^\\*.*" 0 font-lock-keyword-face keep)))
- Re: font-lock-keywords and lines containing comments / quotes,
Johan Bockgård <=