all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Is the doc string for font-lock-add-keywords correct?
@ 2008-01-17 22:51 Lennart Borgman (gmail)
  2008-01-18  1:47 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-17 22:51 UTC (permalink / raw)
  To: Emacs Devel

I just tested to add some keywords in the *scratch* buffer, but I can 
not get any changes to the fontification of the comment.

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.)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is the doc string for font-lock-add-keywords correct?
  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
  2008-01-18 19:33   ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2008-01-18  1:47 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: Emacs developers


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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is the doc string for font-lock-add-keywords correct?
  2008-01-18  1:47 ` Glenn Morris
@ 2008-01-18 19:33   ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 3+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-18 19:33 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Emacs developers

Glenn Morris wrote:
> 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.)

It works for me too now. Obviously I did something else than I thought. 
Maybe I did not trigger enough refontification, don't know.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-18 19:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-01-18 19:33   ` Lennart Borgman (gmail)

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.