From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: how to prevent font-lock from messing with a portion of text? Date: Fri, 23 Mar 2007 12:07:53 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1174666084 4117 80.91.229.12 (23 Mar 2007 16:08:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Mar 2007 16:08:04 +0000 (UTC) Cc: Emacs-Devel To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 23 17:08:01 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 1HUmJ5-0002fk-V0 for ged-emacs-devel@m.gmane.org; Fri, 23 Mar 2007 17:08:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUmL0-0006Sp-Mt for ged-emacs-devel@m.gmane.org; Fri, 23 Mar 2007 11:09:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HUmKw-0006PF-M8 for emacs-devel@gnu.org; Fri, 23 Mar 2007 12:09:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HUmKw-0006Oo-BG for emacs-devel@gnu.org; Fri, 23 Mar 2007 12:09:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUmKw-0006OT-4V for emacs-devel@gnu.org; Fri, 23 Mar 2007 11:09:54 -0500 Original-Received: from tomts40.bellnexxia.net ([209.226.175.97] helo=tomts40-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HUmJ0-0001Eo-CL for emacs-devel@gnu.org; Fri, 23 Mar 2007 12:07:54 -0400 Original-Received: from pastel.home ([70.55.83.113]) by tomts40-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070323160753.PWBF1624.tomts40-srv.bellnexxia.net@pastel.home> for ; Fri, 23 Mar 2007 12:07:53 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id A0C347F48; Fri, 23 Mar 2007 12:07:53 -0400 (EDT) In-Reply-To: (Drew Adams's message of "Thu\, 22 Mar 2007 12\:20\:05 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) X-detected-kernel: Solaris 8 (1) 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:68409 Archived-At: > Use put-text-property to add a face to some text using the `face' property. > Prevent subsequent "erasure" of that highlighting by font-lock. The `font-lock-face' property was designed specifically for this kind of case. > I would like to be able to, say, set a particular text property on the same > text, which would cause font-lock to ignore that text (skip over it, as if > it weren't there). Again, there's no such general facility, so give us more info. > I thought that's what property `fontified' (= t) would do, but that seems > not to be the case. `fontified' is a jit-lock thing, so don't expect to be able to use it to solve font-lock problems. > The Elisp manual says this about `fontified': > This property says whether the character has a face assigned to it > by font locking. The display engine tests it to decide whether a > buffer portion needs refontifying before display. *Note Auto > Faces::. It takes one of three values: > `nil' > Font locking is disabled, or the character's `face' property, > if any, is invalid. Huh? I don't agree with this part of the manual. `nil' means that the fontification is not uptodate (so it will be refontified next time the block is made visible, for example). So I think the term "invalid" is a bit strong here. Also it's not "font locking is disabled" but "jit-lock is disabled". Stefan