unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Luca Ferrari <fluca1978@infinito.it>
To: Tim Visher <tim.visher@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: set font for TODO
Date: Mon, 3 Jun 2013 15:11:34 +0200	[thread overview]
Message-ID: <CAKoxK+5VDuxK6t4=jd0rJKOnOu+NamT=d5GaeHtnM-v3WmkBzg@mail.gmail.com> (raw)
In-Reply-To: <CAHa53uyAzN0NuDyCQFtPLBGHe1ynJrD9LanXbGDcNeSLmiP0YQ@mail.gmail.com>

On Mon, Jun 3, 2013 at 2:43 PM, Tim Visher <tim.visher@gmail.com> 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



  reply	other threads:[~2013-06-03 13:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03  6:54 set font for TODO Luca Ferrari
2013-06-03 12:43 ` Tim Visher
2013-06-03 13:11   ` Luca Ferrari [this message]
     [not found]   ` <mailman.925.1370265110.22516.help-gnu-emacs@gnu.org>
2013-06-13 14:44     ` Stefan Monnier

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='CAKoxK+5VDuxK6t4=jd0rJKOnOu+NamT=d5GaeHtnM-v3WmkBzg@mail.gmail.com' \
    --to=fluca1978@infinito.it \
    --cc=help-gnu-emacs@gnu.org \
    --cc=tim.visher@gmail.com \
    /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).