From: Glenn Morris <rgm@gnu.org>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Is the doc string for font-lock-add-keywords correct?
Date: Thu, 17 Jan 2008 20:47:28 -0500 [thread overview]
Message-ID: <18320.1328.142935.573467@fencepost.gnu.org> (raw)
In-Reply-To: <478FDBEB.8070806@gmail.com>
Lennart Borgman wrote (on Thu, 17 Jan 2008 at 23:51 +0100):
> I just tested to add some keywords in the *scratch* buffer, but I can
> not get any changes to the fontification of the comment.
Give a complete recipe.
Works fine for me:
(font-lock-add-keywords nil '(("FOOBAR" 0 font-lock-warning-face t)))
Now type:
;; FOOBAR is a warning
(You need to do something to trigger refontification.)
> There was a discussion about the highlighting regular expressions
> before. hi-lock-mode seems to do a similar thing. I do not understand
> what it does, but does it not do a bit more to achieve the highlighting
> everywhere in the buffer? (hi-lock-mode works ok for me.)
What?
next prev parent reply other threads:[~2008-01-18 1:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-17 22:51 Is the doc string for font-lock-add-keywords correct? Lennart Borgman (gmail)
2008-01-18 1:47 ` Glenn Morris [this message]
2008-01-18 19:33 ` Lennart Borgman (gmail)
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=18320.1328.142935.573467@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=lennart.borgman@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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).