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: Last steps for pretesting (font-lock-extend-region-function) Date: Tue, 25 Apr 2006 12:09:40 -0400 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 1145981420 7052 80.91.229.2 (25 Apr 2006 16:10:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Apr 2006 16:10:20 +0000 (UTC) Cc: Richard Stallman , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 25 18:10:18 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 1FYQ70-00083b-GE for ged-emacs-devel@m.gmane.org; Tue, 25 Apr 2006 18:10:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYQ6z-0002ox-UC for ged-emacs-devel@m.gmane.org; Tue, 25 Apr 2006 12:10:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FYQ6o-0002oa-NQ for emacs-devel@gnu.org; Tue, 25 Apr 2006 12:09:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FYQ6n-0002o2-S9 for emacs-devel@gnu.org; Tue, 25 Apr 2006 12:09:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYQ6n-0002nv-NL for emacs-devel@gnu.org; Tue, 25 Apr 2006 12:09:49 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FYQ9H-0002hH-8r; Tue, 25 Apr 2006 12:12:23 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id E01022CF48E; Tue, 25 Apr 2006 12:09:47 -0400 (EDT) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 67A6D445C; Tue, 25 Apr 2006 12:09:40 -0400 (EDT) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 5404D71500; Tue, 25 Apr 2006 12:09:40 -0400 (EDT) Original-To: Alan Mackenzie In-Reply-To: (Stefan Monnier's message of "Tue, 25 Apr 2006 12:05:18 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca 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:53389 Archived-At: >> 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. Stefan