From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: How to prevent font-lock (& jit-lock etc.) from refontifying? Date: Wed, 13 Oct 2004 10:22:38 -0700 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <416D4855.2000406@yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1097688197 4387 80.91.229.6 (13 Oct 2004 17:23:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Oct 2004 17:23:17 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 13 19:23:07 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CHmqA-0007zb-00 for ; Wed, 13 Oct 2004 19:23:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CHmxD-0006dV-SH for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Oct 2004 13:30:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CHmx0-0006dG-2x for help-gnu-emacs@gnu.org; Wed, 13 Oct 2004 13:30:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CHmwz-0006ci-5s for help-gnu-emacs@gnu.org; Wed, 13 Oct 2004 13:30:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CHmwy-0006cf-Ta for help-gnu-emacs@gnu.org; Wed, 13 Oct 2004 13:30:09 -0400 Original-Received: from [148.87.2.204] (helo=inet-mail4.oracle.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CHmpr-0005zE-LH for help-gnu-emacs@gnu.org; Wed, 13 Oct 2004 13:22:47 -0400 Original-Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.191.10]) by inet-mail4.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id i9DHH6TW019070 for ; Wed, 13 Oct 2004 10:17:07 -0700 (PDT) Original-Received: from rgmgw1.us.oracle.com (localhost [127.0.0.1]) by rgmgw1.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id i9DHMdV6016431 for ; Wed, 13 Oct 2004 11:22:39 -0600 Original-Received: from dradamslap (dradams-lap.us.oracle.com [130.35.177.126]) by rgmgw1.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id i9DHMdeQ016418 for ; Wed, 13 Oct 2004 11:22:39 -0600 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <416D4855.2000406@yahoo.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:21236 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21236 Thanks for your replies. Does anyone know if it is true that font-lock provides no way to prevent it from refontifying in the way I described? I'm thinking there must be a (simple) way that I'm ignorant of. I can't believe that they (we) would change font-lock in a way that lets it impose itself so completely. -----Original Message-----From: Kevin Rodgers Sacha Chua wrote: > "Drew Adams" writes: > > In Emacs 21, suppose that I apply a face to certain spans of text. Maybe the > > buffer is already font-locked before doing this, maybe not. In either case, > > I want these spans of text to show the face I apply, overriding any > > font-lock highlighting that might be there. > > One workaround would be to use overlays instead, as overlays override > font properties. Not the answer you're looking for, but might be > helpful... Another technique I've used to work around this problem is to set the category property instead of the face property: (put 'foo 'face 'foo-face) (put-text-property start end 'category 'foo)