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

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

Re: glitches with font-lock-add-keywords -- SOLVED


From: ken
Subject: Re: glitches with font-lock-add-keywords -- SOLVED
Date: Tue, 06 Jun 2006 08:49:48 -0400
User-agent: Mozilla Thunderbird 1.0 (X11/20041207)


martin rudalics wrote:
>> The LimeGreen is showing up and the "sp?" inside of "(sp?)".  I'm
>> thinking that the "()" chars are being overwritten by other, blue
>> highlighting.  ....
>>
>> ....
> 
> The blue highlighting you mention probably comes from paren matching
> overlays and should disappear as soon as you move the cursor.

That's true in elisp-mode, but in html-helper-mode parentheses are
highlighted blue and this overwrites the green.  But that's okay... not
a big deal.


>> ....
>>
>> Again, I just want ??? to be highlighted, not _<(???)>_ or anything like
>> that... just "???".
> 
> I couldn't simply change your initial proposal to something like
> "\\<\\?\\?\\?\\>" because in most modes "?" doesn't have word syntax
> contradicting the use of "\\<" and "\\>".  "\\_<" and "\\_>" force
> matches at symbol begin and end but might not work with Emacs 21.
> 
> Maybe
> 
> (defvar my-extra-keywords
>   '(("\\<\\(FIXME\\):" 1 font-lock-warning-face prepend)
>     ("\\<\\(XXX\\|xxx\\)\\>\\|\\?\\?\\?\\|(sp\\?)" . 'my-extra-face)))
> 
> is all you need.  Otherwise you would have to specify the semantics of
> the word "just" more distinctly.

That did it.  Works perfectly now.  On Emacs 21.  Guess I should save
the previous defs for when I upgrade.

(Note: I wanted "???"-- without the quotation marks-- highlighted.
That's what I get now.)


Thanks very much.  I've been wondering about and playing with that for
months.

ken

-- 
As a statistic, the US Unemployment Rate is like saying that no one is
drowning because the flood waters have risen only five inches today.





reply via email to

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