From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Last steps for pretesting (font-lock-extend-region-function) Date: Tue, 25 Apr 2006 21:52:01 +0000 (GMT) Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1146005912 29336 80.91.229.2 (25 Apr 2006 22:58:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Apr 2006 22:58:32 +0000 (UTC) Cc: Richard Stallman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 26 00:58:30 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FYWUE-0005io-JF for ged-emacs-devel@m.gmane.org; Wed, 26 Apr 2006 00:58:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYWUE-0003U5-7o for ged-emacs-devel@m.gmane.org; Tue, 25 Apr 2006 18:58:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FYWSl-0002PX-9j for emacs-devel@gnu.org; Tue, 25 Apr 2006 18:56:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FYWSk-0002PB-S1 for emacs-devel@gnu.org; Tue, 25 Apr 2006 18:56:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYWSk-0002P3-HI for emacs-devel@gnu.org; Tue, 25 Apr 2006 18:56:54 -0400 Original-Received: from [193.149.49.134] (helo=acm.acm) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FYWVH-0004Gv-Dh; Tue, 25 Apr 2006 18:59:32 -0400 Original-Received: from localhost (root@localhost) by acm.acm (8.8.8/8.8.8) with SMTP id VAA00390; Tue, 25 Apr 2006 21:52:01 GMT X-Sender: root@acm.acm Original-To: Stefan Monnier In-Reply-To: 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:53431 Archived-At: Hi, Stefan! On Tue, 25 Apr 2006, Stefan Monnier wrote: >>> Surely not - that variable is essentially buffer local, and it makes no >>> sense for it not to be so. To remove the make-variable-buffer-local call >>> could lead to the same problems which have bedevilled paragraph-start and >>> paragraph-separate. >> It's a variable which should be modified via `add-hook' (which has >> a parameter to specify whether it should be applied buffer-locally or not), >> not via setq. So there is need for make-variable-buffer-local. >> Especially since it does make sense to add stuff to it globally as well: >> Think about someone who wants to re-add the font-lock-extra-lines feature. >> Similarly the font-lock-multiline property could be handled by moving the >> code from font-lock-default-fontify-region to this hook. >Hmmm... sorry 'bout that: I was assuming changing it a list of functions, >but indeed it's not necessarily a good idea. >Still: even if it's a simple variable, you shouldn't set it via `setq' >but via font-lock-defaults (which will use make-local-variable for you), >so there's still no justification for make-variable-buffer-local. I don't think XEmacs has got this mechanism yet, so portable code will be carrying on using `setq' for some time. > Stefan -- Alan.