From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luca Ferrari Newsgroups: gmane.emacs.help Subject: Re: set font for TODO Date: Mon, 3 Jun 2013 15:11:34 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1370265124 30864 80.91.229.3 (3 Jun 2013 13:12:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Jun 2013 13:12:04 +0000 (UTC) Cc: help-gnu-emacs To: Tim Visher Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 03 15:12:04 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UjUYM-00083m-5y for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Jun 2013 15:12:02 +0200 Original-Received: from localhost ([::1]:38954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjUYL-0006XZ-MQ for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Jun 2013 09:12:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjUY5-0006XG-2D for help-gnu-emacs@gnu.org; Mon, 03 Jun 2013 09:11:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjUY0-0002VU-9p for help-gnu-emacs@gnu.org; Mon, 03 Jun 2013 09:11:44 -0400 Original-Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:64511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjUY0-0002VA-29 for help-gnu-emacs@gnu.org; Mon, 03 Jun 2013 09:11:40 -0400 Original-Received: by mail-we0-f171.google.com with SMTP id m46so1734692wev.30 for ; Mon, 03 Jun 2013 06:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=q3kx18DdUHKf6Z9eUIKiajfmEgzNFTVPbz1nsnamKaE=; b=wQi+D91+5SiU3M8jgJMd2fQwBn+kgWMd25FvxUzNU81o66+LKbqK5tuLFFt87mqNxF U2832tABQ5HHV1CguEbFodN5Bpdn6vCs66To2SsFtrQGcapuAEw7fQBAq4nbff+QAK37 7HsJR9UumlBbn09skbbnQ7CL+Y0TSMe0QJuAqVKDC4DxrE/iLmUAGXNxV8/Zztkb7ggS xkzci1marL0cr+YnuO/ZCZ2zNJpagYgkgTVFo+F/tHl06DmkKgGoQR5tNFw8gBgRQBtE XJcUt2Ug2YAt1MV8EXHlSBNWY3ek1JsLvlD9dwnudnOFZ7m+HsgyoW06s0a7EuSujrjO Sgiw== X-Received: by 10.180.183.139 with SMTP id em11mr12615877wic.16.1370265094454; Mon, 03 Jun 2013 06:11:34 -0700 (PDT) Original-Received: by 10.194.19.36 with HTTP; Mon, 3 Jun 2013 06:11:34 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: 4RFe4LD_iMBflCX7Aw8raEO9dis X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::22b X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91259 Archived-At: On Mon, Jun 3, 2013 at 2:43 PM, Tim Visher wrote: > You'll probably need to define your own custom face, maybe having it > inherit from font-lock-warning-face, and then have font-lock apply > your new face rather than the old face to your keywords. > I need a little help here, I'm not getting how to do it: (defface fluca1978-programming-fixme-face '((t (:inherit font-lock-warning-face))) "Face used to emphasize fixme words" ) (defun fluca1978/fontify-fixme () (font-lock-add-keywords nil '(("\\<\\(FIX\\|TODO\\|FIXME\\|HACK\\|REFACTOR\\|XXX\\)[ \t\s\n:]*" 1 fluca1978-programming-fixme-face t)))) The result is that nothing is emphasized. Moreover if I write, for instance, FIXME (without the colon) I get the following words un-fontified, as if the regular expression was wrong. What am I missing? Thanks, Luca