[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13917: 24.3.50; Elisp manual: Font Lock Mode
From: |
Lars Ingebrigtsen |
Subject: |
bug#13917: 24.3.50; Elisp manual: Font Lock Mode |
Date: |
Fri, 01 Nov 2019 17:48:11 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Joost Kremers <joost.kremers@phil.uni-goettingen.de> writes:
> The Elisp manual, info node "(elisp) Search-based Fontification" states
> the following:
>
> ,----
> | `(MATCHER . FACESPEC)'
> | In this kind of element, FACESPEC is an expression whose value
> | specifies the face to use for highlighting. In the simplest case,
> | FACESPEC is a Lisp variable (a symbol) whose value is a face name.
> |
> | ;; Highlight occurrences of `fubar',
> | ;; using the face which is the value of `fubar-face'.
> | ("fubar" . fubar-face)
> |
> | However, FACESPEC can also evaluate to a list of this form:
> |
> | (face FACE PROP1 VAL1 PROP2 VAL2...)
> |
> | to specify the face FACE and various additional text properties to
> | put on the text that matches. If you do this, be sure to add the
> | other text property names that you set in this way to the value of
> | `font-lock-extra-managed-props' so that the properties will also
> | be cleared out when they are no longer appropriate. Alternatively,
> | you can set the variable `font-lock-unfontify-region-function' to
> | a function that clears these properties. *Note Other Font Lock
> | Variables::.
> `----
>
> However, a font lock entry of the type
>
> ,----
> | (MATCHER . (face FACE PROP1 VAL1 PROP1 VAL2))
> `----
>
> does not actually work. What works is any of the forms:
>
> ,----
> | (MATCHER . (0 (face FACE PROP1 VAL1 PROP1 VAL2)))
> | (MATCHER 0 (face FACE PROP1 VAL1 PROP1 VAL2))
> | (MATCHER (0 (face FACE PROP1 VAL1 PROP1 VAL2)))
> `----
>
> (Where the first two are of course equivalent).
Hm... is this a bug in the documentation or the code, though? It seems
like it would be logical for the described syntax to work, doesn't it?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#13917: 24.3.50; Elisp manual: Font Lock Mode,
Lars Ingebrigtsen <=