* Stefan Monnier (2005-04-06) writes:

>>> I think (face FACE [PROP VAL]...) would be clearer.
>
>> AFAICS the "face FACE" part isn't even necessary; you can pass a
>> property/value-only list to `font-lock-keywords' and it will work as
>> well (you might have to disable global-font-lock-mode before trying
>> this):
>
>> (progn
>>   (pop-to-buffer (get-buffer-create "*foo*"))
>>   (insert "foo")
>>   (setq font-lock-keywords '(("foo" 0 '(:foreground "green"))))
>>   (font-lock-fontify-keywords-region (point-min) (point-max)))
>
> It doesn't do the same.  Your example only affects the `face' property,
> whereas what the doc is talking about is how to set several text properties,
> additionally to the `face' property (e.g. thinks like `keymap', `display'
> `invisible', ...).

Oh, I see.

>> This is not covered in the manual and doc string yet, or am I missing
>> something?
>
> It's probably discussed in the section talking about faces.
> It's not specific to font-lock at all.

In the section about faces there is a subsection about face
attributes.  But it doesn't mention that you can use a list of such
attributes and associated values for `font-lock-keywords'.  The
documentation of `font-lock-keywords' could describe it, though.  That
is what I meant, although I confused text properties with face
attributes.

-- 
Ralf


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to