From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.60; M-x compile gives args out of range 0, 0 Date: Tue, 8 Apr 2008 17:22:27 +0000 Message-ID: <20080408172227.GA3399@muc.de> References: <47FB4E7D.3020504@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207674412 20876 80.91.229.12 (8 Apr 2008 17:06:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Apr 2008 17:06:52 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Jan DjFFFFFFFFFFFFFFrv To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 08 19:07:22 2008 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 1JjHHW-0006vF-II for ged-emacs-devel@m.gmane.org; Tue, 08 Apr 2008 19:06:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjHGt-0004If-9G for ged-emacs-devel@m.gmane.org; Tue, 08 Apr 2008 13:06:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JjHGo-0004IF-LZ for emacs-devel@gnu.org; Tue, 08 Apr 2008 13:06:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JjHGl-0004G8-3h for emacs-devel@gnu.org; Tue, 08 Apr 2008 13:06:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjHGk-0004Fz-Ob for emacs-devel@gnu.org; Tue, 08 Apr 2008 13:06:02 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JjHGk-0006ew-Cr for emacs-devel@gnu.org; Tue, 08 Apr 2008 13:06:02 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JjHGj-0007p1-Ud for emacs-pretest-bug@gnu.org; Tue, 08 Apr 2008 13:06:02 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JjHGg-0006do-2N for emacs-pretest-bug@gnu.org; Tue, 08 Apr 2008 13:06:01 -0400 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JjHGf-0006dA-HV for emacs-pretest-bug@gnu.org; Tue, 08 Apr 2008 13:05:57 -0400 Original-Received: (qmail 83376 invoked by uid 3782); 8 Apr 2008 17:05:54 -0000 Original-Received: from acm.muc.de (p57AF571D.dip.t-dialin.net [87.175.87.29]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Tue, 08 Apr 2008 19:05:53 +0200 Original-Received: (qmail 3566 invoked by uid 1000); 8 Apr 2008 17:22:27 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:94722 gmane.emacs.pretest.bugs:21943 Archived-At: Hi, everybody! On Tue, Apr 08, 2008 at 11:03:02AM -0400, Stefan Monnier wrote: > > When doing M-x compile I get: > > font-lock-extend-region-multiline: Args out of range: 0, 0 > > Does the patch below make it disappear, by any chance? > > > Stefan > > > === modified file 'lisp/progmodes/cc-mode.el' > --- lisp/progmodes/cc-mode.el 2008-04-07 16:37:22 +0000 > +++ lisp/progmodes/cc-mode.el 2008-04-08 15:01:47 +0000 With respect, that's the wrong place to patch. It is liable to catch out anybody else who uses font-lock-extend-after-change-region-function in the future. This variable should be made buffer-local once and for all, like this: Index: font-lock.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/font-lock.el,v retrieving revision 1.333 diff -c -r1.333 font-lock.el *** font-lock.el 14 Mar 2008 16:15:47 -0000 1.333 --- font-lock.el 8 Apr 2008 17:01:34 -0000 *************** *** 996,1002 **** (defvar font-lock-extend-after-change-region-function nil "A function that determines the region to refontify after a change. ! This variable is either nil, or is a function that determines the region to refontify after a change. It is usually set by the major mode via `font-lock-defaults'. Font-lock calls this function after each buffer change. --- 996,1002 ---- (defvar font-lock-extend-after-change-region-function nil "A function that determines the region to refontify after a change. ! This buffer-local variable is either nil, or is a function that determines the region to refontify after a change. It is usually set by the major mode via `font-lock-defaults'. Font-lock calls this function after each buffer change. *************** *** 1007,1012 **** --- 1007,1013 ---- \(which directs the caller to fontify a default region). This function should preserve the match-data. The region it returns may start or end in the middle of a line.") + (make-variable-buffer-local 'font-lock-extend-after-change-region-function) (defun font-lock-fontify-buffer () "Fontify the current buffer the way the function `font-lock-mode' would." -- Alan Mackenzie (Nuremberg, Germany).