From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Visher Newsgroups: gmane.emacs.help Subject: Re: set font for TODO Date: Mon, 3 Jun 2013 08:43:55 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1370264003 18764 80.91.229.3 (3 Jun 2013 12:53:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Jun 2013 12:53:23 +0000 (UTC) Cc: help-gnu-emacs To: Luca Ferrari Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 03 14:53:25 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 1UjUGK-00060a-GT for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Jun 2013 14:53:24 +0200 Original-Received: from localhost ([::1]:59483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjUGK-0000nB-7Z for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Jun 2013 08:53:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjUG4-0000gI-2m for help-gnu-emacs@gnu.org; Mon, 03 Jun 2013 08:53:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjUFy-0003tA-Un for help-gnu-emacs@gnu.org; Mon, 03 Jun 2013 08:53:07 -0400 Original-Received: from mail-vb0-x22b.google.com ([2607:f8b0:400c:c02::22b]:49555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjU7p-0000wa-6L for help-gnu-emacs@gnu.org; Mon, 03 Jun 2013 08:44:37 -0400 Original-Received: by mail-vb0-f43.google.com with SMTP id e15so1034502vbg.16 for ; Mon, 03 Jun 2013 05:44:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=2uCwmkxTyDRpvkaJ1znSZ+SwzRfW4u843DDQwWXcMG8=; b=mtn5Upmrw1O7UqpwwJYuAook5gOF5Wr6We9qkbGMfl3kgJWooJefNdbKJIdbC6qKxa T3aK+sdCO1eteB9ZfQpVU/zRItKIrmmPtzGoxniMskI+odAlN2JlU4N8TRTR7uuUVjXv 6VfVzGPLLi1nYh5RzVQkFDG0WGqSyq1xbV/0Emcp+6MxxlGrAtxc5KZHhfGE7iH2OPu8 PqiTy4ZM3EjGeDC4UCWiSwVGYKSvWIQDKGJAFrnzpaFycERSh4FVUcV32jgIZhmFlNJ9 zS8wc0hmqG5H+08Uw9nHA9dek6drSbKh2jpIZfsHu2Q94tHG/PqSU8AStIRK0WOMS2H1 O2ag== X-Received: by 10.58.229.69 with SMTP id so5mr16814823vec.6.1370263476507; Mon, 03 Jun 2013 05:44:36 -0700 (PDT) Original-Received: by 10.220.50.78 with HTTP; Mon, 3 Jun 2013 05:43:55 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c02::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:91256 Archived-At: On Mon, Jun 3, 2013 at 2:54 AM, Luca Ferrari wrote: > this could be trivial but I cannot find a solution: I'd like to > emphasize some warning/todo words with a special font, so in the > beginning I did: > > (custom-set-faces > '(font-lock-warning-face ((t (:foreground "Yellow" :weight bold )))) ) > > (defun fluca1978/fontify-fixme () > (font-lock-add-keywords > nil '(("\\<\\(FIX\\|TODO\\|FIXME\\|HACK\\|REFACTOR\\|XXX\\)[ \t\s\n:]*" > 1 font-lock-warning-face t)))) > > > but of course this has the side effect to fontify also every other > string that emacs applies warning-face to. So how can I isolate my > keyword list from the emacs one? 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. -- In Christ, Timmy V. http://blog.twonegatives.com/ http://five.sentenc.es/ -- Spend less time on mail