From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: how to prevent font-lock from messing with a portion of text? Date: Sun, 25 Mar 2007 22:52:23 -0700 Message-ID: References: <460728EA.4000800@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1174888485 23045 80.91.229.12 (26 Mar 2007 05:54:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Mar 2007 05:54:45 +0000 (UTC) Cc: Emacs-Devel To: "Lennart Borgman \(gmail\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 26 07:54:39 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HViA9-0002lz-KF for ged-emacs-devel@m.gmane.org; Mon, 26 Mar 2007 07:54:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HViCL-00010v-IP for ged-emacs-devel@m.gmane.org; Mon, 26 Mar 2007 00:56:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HViCH-0000uf-8c for emacs-devel@gnu.org; Mon, 26 Mar 2007 01:56:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HViCF-0000o1-87 for emacs-devel@gnu.org; Mon, 26 Mar 2007 01:56:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HViCF-0000nl-1U for emacs-devel@gnu.org; Mon, 26 Mar 2007 00:56:47 -0500 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HViA0-0004sk-DN for emacs-devel@gnu.org; Mon, 26 Mar 2007 01:54:29 -0400 Original-Received: from rgmgw3.us.oracle.com (rgmgw3.us.oracle.com [138.1.186.112]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id l2Q5sINs018070; Sun, 25 Mar 2007 23:54:18 -0600 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by rgmgw3.us.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id l2Q5Zxn2024093; Sun, 25 Mar 2007 23:54:17 -0600 Original-Received: from dhcp-amer-rmdc-csvpn-gw5-141-144-104-99.vpn.oracle.com by acsmt350.oracle.com with ESMTP id 2560415541174888343; Sun, 25 Mar 2007 22:52:23 -0700 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <460728EA.4000800@gmail.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-Whitelist: TRUE X-Whitelist: TRUE X-Brightmail-Tracker: AAAAAQAAAAI= X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:68573 Archived-At: > Don't you have to take care of font-lock-default-fontify-region too? Not that I can see. Did you try it? It takes only a minute to try. `font-lock-default-fontify-region' does its job through other functions, such as `font-lock-unfontify-region', `font-lock-fontify-syntactic-keywords-region', `font-lock-fontify-syntactically-region', and `font-lock-fontify-keywords-region'. `font-lock-default-fontify-region' never adds any text properties itself. By substituting `put-text-property-unless-ignore' for `put-text-property' in those other functions, `font-lock-default-fontify-region' is "taken care of" also. Let me know if you see a problem with it.