From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: glitches with font-lock-add-keywords -- SOLVED Date: Tue, 06 Jun 2006 08:49:48 -0400 Message-ID: <448579EC.7010809@speakeasy.net> References: <4483D436.1070105@gmx.at> <4484A7FF.7090708@speakeasy.net> <448522E8.6070403@gmx.at> Reply-To: gebser@speakeasy.net NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1149598250 23394 80.91.229.2 (6 Jun 2006 12:50:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 6 Jun 2006 12:50:50 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 06 14:50:49 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fnb13-0003Hr-Mt for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Jun 2006 14:50:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fnb13-0006YK-8G for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Jun 2006 08:50:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fnb0r-0006Xl-9V for help-gnu-emacs@gnu.org; Tue, 06 Jun 2006 08:50:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fnb0p-0006W8-01 for help-gnu-emacs@gnu.org; Tue, 06 Jun 2006 08:50:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fnb0o-0006Vx-SN for help-gnu-emacs@gnu.org; Tue, 06 Jun 2006 08:50:22 -0400 Original-Received: from [69.17.117.10] (helo=mail8.sea5.speakeasy.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fnb8B-0003jf-MC for help-gnu-emacs@gnu.org; Tue, 06 Jun 2006 08:57:59 -0400 Original-Received: (qmail 13231 invoked from network); 6 Jun 2006 12:50:21 -0000 Original-Received: from dsl093-011-017.cle1.dsl.speakeasy.net (HELO [192.168.0.27]) (gebser@[66.93.11.17]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 6 Jun 2006 12:50:20 -0000 User-Agent: Mozilla Thunderbird 1.0 (X11/20041207) X-Accept-Language: en-us, en Original-To: martin rudalics , help-gnu-emacs@gnu.org In-Reply-To: <448522E8.6070403@gmx.at> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:35344 Archived-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.