all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <bug-gnu-emacs@gnu.org>
Subject: bug#5183: 23.1; doc for `font-lock-extra-managed-props'
Date: Fri, 11 Dec 2009 09:54:46 -0800	[thread overview]
Message-ID: <3C306CA030F94790932CED2CA0EE4DA8@us.oracle.com> (raw)

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







             reply	other threads:[~2009-12-11 17:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-11 17:54 Drew Adams [this message]
2009-12-11 18:37 ` bug#5183: 23.1; doc for `font-lock-extra-managed-props' Drew Adams
2016-04-27 20:23 ` Lars Ingebrigtsen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C306CA030F94790932CED2CA0EE4DA8@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=5183@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    /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 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.