From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier 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, 08 Apr 2008 14:05:07 -0400 Message-ID: References: <47FB4E7D.3020504@swipnet.se> <20080408172227.GA3399@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207677984 2632 80.91.229.12 (8 Apr 2008 18:06:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Apr 2008 18:06:24 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Jan DjFFFFFFFFFFFFFFrv To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 08 20:06:54 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 1JjICx-0005F9-EV for ged-emacs-devel@m.gmane.org; Tue, 08 Apr 2008 20:06:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjICK-0003OH-7l for ged-emacs-devel@m.gmane.org; Tue, 08 Apr 2008 14:05:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JjICG-0003OC-G4 for emacs-devel@gnu.org; Tue, 08 Apr 2008 14:05:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JjICD-0003Nj-NJ for emacs-devel@gnu.org; Tue, 08 Apr 2008 14:05:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjICD-0003Ng-HI for emacs-devel@gnu.org; Tue, 08 Apr 2008 14:05:25 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JjICD-0006UB-2G for emacs-devel@gnu.org; Tue, 08 Apr 2008 14:05:25 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JjICC-0000nY-PV for emacs-pretest-bug@gnu.org; Tue, 08 Apr 2008 14:05:24 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JjIC9-0006T7-80 for emacs-pretest-bug@gnu.org; Tue, 08 Apr 2008 14:05:24 -0400 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JjIC8-0006T1-Uk for emacs-pretest-bug@gnu.org; Tue, 08 Apr 2008 14:05:21 -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 5F8272CF787; Tue, 8 Apr 2008 14:05:20 -0400 (EDT) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 62C973FE2; Tue, 8 Apr 2008 14:05:07 -0400 (EDT) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 4EF7C3FC8A; Tue, 8 Apr 2008 14:05:07 -0400 (EDT) In-Reply-To: <20080408172227.GA3399@muc.de> (Alan Mackenzie's message of "Tue, 8 Apr 2008 17:22:27 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (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-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:94726 gmane.emacs.pretest.bugs:21945 Archived-At: >> > 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: I disagree. A major mode should basically *never* change globally a defvar, except maybe for its own vars (plus a few exceptions, of course). I.e. `setq' should only ever be used on let-bound variables. If you happen to know that the variable is "automatically buffer-local", it's OK to use `setq', but it's always safer to use `make-local-variable', especially because unless the package that does the defvar (and make-variable-buffer-local) is preloaded you may end up calling `setq' before make-variable-buffer-local and get into trouble. I'm not opposed to make-variable-buffer-local, but the bug was clearly in CC-mode, because a major mode should by default use (set (make-local-variable ...) ...) rather than setq. BTW, why doesn't CC-mode set those vars via font-lock-defaults, as the author of font-lock intended? Stefan