From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.help Subject: Re: glitches with font-lock-add-keywords Date: Mon, 05 Jun 2006 08:50:30 +0200 Message-ID: <4483D436.1070105@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1149490509 362 80.91.229.2 (5 Jun 2006 06:55:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Jun 2006 06:55:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 05 08:55:08 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 1Fn8zN-0004cx-5j for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Jun 2006 08:55:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fn8zM-0001Jr-Or for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Jun 2006 02:55:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fn8zA-0001Gg-ES for help-gnu-emacs@gnu.org; Mon, 05 Jun 2006 02:54:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fn8z8-0001Ev-QU for help-gnu-emacs@gnu.org; Mon, 05 Jun 2006 02:54:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fn8z8-0001Er-Jj for help-gnu-emacs@gnu.org; Mon, 05 Jun 2006 02:54:46 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1Fn96D-0002l7-Rq for help-gnu-emacs@gnu.org; Mon, 05 Jun 2006 03:02:06 -0400 Original-Received: (qmail invoked by alias); 05 Jun 2006 06:54:44 -0000 Original-Received: from N776P014.adsl.highway.telekom.at (EHLO [62.47.40.238]) [62.47.40.238] by mail.gmx.net (mp029) with SMTP; 05 Jun 2006 08:54:44 +0200 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: gebser@speakeasy.net, help-gnu-emacs@gnu.org X-Y-GMX-Trusted: 0 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:35328 Archived-At: > (defvar my-extra-keywords > '(("\\<\\(FIXME\\):" 1 font-lock-warning-face prepend) > ("\\<\\(XXX\\|xxx\\|???\\|(sp?)\\)\\>" . font-lock-keyword-face))) > > The strings "XXX" and "xxx" are the only ones which are colorized at > all, showing up as magenta. I would like all of them to be something > more striking, like lime-green. Is there a table or some sort of > "translation" which can be used to determine what actual color names > correspond to vars like "font-lock-warning-face" and > "font-lock-keyword"? Or, better, can actual color names be used > instead, and if so, where would I find a table or listing of them? (defface my-extra-face '((t (:foreground "LimeGreen"))) "My extra face. Pick your favorite group on the next line." :group 'basic-faces) > Secondly: None of the strings containing a '?' are colorized at all > (they're just black, the same as "normal" text); I understand that '?' > is a special character in elisp and so requires some minor syntactical > gymnastics to induce emacs to treat it as a regular character. So what > is the syntax I should use for that here? Assuming that the question mark is a symbol constituent and "(" and ")" are open and close parenthesis characters you can try: (defvar my-extra-keywords '(("\\<\\(FIXME\\):" 1 font-lock-warning-face prepend) ("\\<\\(XXX\\|xxx\\)\\>\\|\\_<\\(\\?\\?\\?\\)\\_>\\|(sp\\?)" . 'my-extra-face)))