From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#5183: 23.1; doc for `font-lock-extra-managed-props' Date: Fri, 11 Dec 2009 09:54:46 -0800 Message-ID: <3C306CA030F94790932CED2CA0EE4DA8@us.oracle.com> Reply-To: Drew Adams , 5183@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1260556483 25544 80.91.229.12 (11 Dec 2009 18:34:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Dec 2009 18:34:43 +0000 (UTC) To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 11 19:34:36 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NJAK3-0007Q8-1Z for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Dec 2009 19:34:36 +0100 Original-Received: from localhost ([127.0.0.1]:44057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJAK2-0005LU-KB for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Dec 2009 13:34:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJ9tw-0006zb-GB for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2009 13:07:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJ9tr-0006yL-9K for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2009 13:07:36 -0500 Original-Received: from [199.232.76.173] (port=45125 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJ9tq-0006yB-VN for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2009 13:07:31 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:42034) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NJ9tq-0002x1-FT for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2009 13:07:30 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBBI7Sea028806; Fri, 11 Dec 2009 10:07:28 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nBBI04wC027227; Fri, 11 Dec 2009 10:00:04 -0800 Resent-Date: Fri, 11 Dec 2009 10:00:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 11 Dec 2009 18:00:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 5183 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.126055412527071 (code B ref -1); Fri, 11 Dec 2009 18:00:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 11 Dec 2009 17:55:25 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBBHtNkp027068 for ; Fri, 11 Dec 2009 09:55:25 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJ9i7-0003B3-5Z for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2009 12:55:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJ9i2-000347-64 for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2009 12:55:22 -0500 Original-Received: from [199.232.76.173] (port=41624 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJ9i1-00033l-Gl for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2009 12:55:17 -0500 Original-Received: from rcsinet11.oracle.com ([148.87.113.123]:52994 helo=rgminet11.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NJ9i1-0001vp-2R for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2009 12:55:17 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rgminet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id nBBHtTnL013768 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 11 Dec 2009 17:55:32 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id nBBHec8J009381 for ; Fri, 11 Dec 2009 17:55:27 GMT Original-Received: from abhmt006.oracle.com by acsmt358.oracle.com with ESMTP id 950510061260554087; Fri, 11 Dec 2009 11:54:47 -0600 Original-Received: from dradamslap1 (/24.5.185.59) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 11 Dec 2009 09:54:46 -0800 X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: Acp6iwaJqJJBJhepT76YviLVKiKN0Q== X-Source-IP: acsmt354.oracle.com [141.146.40.154] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090208.4B22877A.0181:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 11 Dec 2009 13:07:35 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33498 Archived-At: 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)'