all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#5183: 23.1; doc for `font-lock-extra-managed-props'
@ 2009-12-11 17:54 Drew Adams
  2009-12-11 18:37 ` Drew Adams
  2016-04-27 20:23 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 3+ messages in thread
From: Drew Adams @ 2009-12-11 17:54 UTC (permalink / raw)
  To: bug-gnu-emacs

It is not clear from the doc what this variable does or how it works.
The doc string says:
 
"Additional text properties managed by font-lock.
This is used by `font-lock-default-unfontify-region' to decide
what properties to clear before refontifying a region."
 
This speaks only of clearing the properties. It says nothing about how
(re-)fontifying works for such extra properties.
 
The elisp manual says only this:
 
"This variable specifies additional properties (other than
`font-lock-face') that are being managed by Font Lock mode.  It is
used by `font-lock-default-unfontify-region', which normally only
manages the `font-lock-face' property.  If you want Font Lock to
manage other properties as well, you must specify them in a
FACESPEC in `font-lock-keywords' as well as add them to this list.
*Note Search-based Fontification::."
 
Again, the only thing explained is that unfontifying will remove these
properties (along with property `font-lock-face'). There is no real
explanation of how to use this variable wrt fontifying.
 
And the cross reference doesn't seem to help at all. Node
`Search-based Fontification' does not say anything (that I can find)
about `font-lock-extra-managed-props' or how to make font lock "manage
other properties".
 
The doc string of `font-lock-keywords' comes the closest to explaining
how to use this variable, as a side note to this paragraph:
 
"FACENAME is an expression whose value is the face name to use.
Instead of a face, FACENAME can evaluate to a property list of the
form (face FACE PROP1 VAL1 PROP2 VAL2 ...)  in which case all the
listed text-properties will be set rather than just FACE.  In such a
case, you will most likely want to put those properties in
`font-lock-extra-managed-props' or to override
`font-lock-unfontify-region-function'."
 
The only place in the Emacs Lisp source code where this variable is
used, besides font-lock.el, is in compile.el. The use there is
somewhat complex, but it seems to be this:
 
1. `compilation-mode-font-lock-keywords' adds extra properties
(directory message help-echo mouse-face debug) to
`font-lock-keywords', via `compilation-directory-properties'.
 
2. `font-lock-extra-managed-props' is set to those same properties, so
they will be removed via `font-lock-default-unfontify-region'.
 
Please explain in the elisp manual how this variable can actually be
used to "manage other properties". Consider adding a simple example -
e.g. a simpler version of what is done in compile.el.
 

In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
 of 2009-07-29 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4)'
 







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

end of thread, other threads:[~2016-04-27 20:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11 17:54 bug#5183: 23.1; doc for `font-lock-extra-managed-props' Drew Adams
2009-12-11 18:37 ` Drew Adams
2016-04-27 20:23 ` Lars Ingebrigtsen

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.