From: ken <gebser@speakeasy.net>
Subject: Re: glitches with font-lock-add-keywords -- SOLVED
Date: Tue, 06 Jun 2006 08:49:48 -0400 [thread overview]
Message-ID: <448579EC.7010809@speakeasy.net> (raw)
In-Reply-To: <448522E8.6070403@gmx.at>
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.
next prev parent reply other threads:[~2006-06-06 12:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-05 6:50 glitches with font-lock-add-keywords martin rudalics
2006-06-05 21:54 ` ken
2006-06-06 6:38 ` martin rudalics
2006-06-06 12:49 ` ken [this message]
2006-06-06 3:10 ` Johan Bockgård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=448579EC.7010809@speakeasy.net \
--to=gebser@speakeasy.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).