From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-pretest-bug@gnu.org, Jan Dj\x1fFFFFFFFFFFFFFFrv <jan.h.d@swipnet.se>
Subject: Re: 23.0.60; M-x compile gives args out of range 0, 0
Date: Tue, 8 Apr 2008 17:22:27 +0000 [thread overview]
Message-ID: <20080408172227.GA3399@muc.de> (raw)
In-Reply-To: <jwvskxwxue2.fsf-monnier+emacsbugreports@gnu.org>
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).
next prev parent reply other threads:[~2008-04-08 17:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-08 10:52 23.0.60; M-x compile gives args out of range 0, 0 Jan Djärv
2008-04-08 15:03 ` Stefan Monnier
2008-04-08 16:32 ` Jan Djärv
2008-04-08 17:22 ` Alan Mackenzie [this message]
2008-04-08 18:05 ` Stefan Monnier
2008-04-08 19:21 ` Alan Mackenzie
2008-04-08 20:22 ` Stefan Monnier
2008-04-09 9:24 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080408172227.GA3399@muc.de \
--to=acm@muc.de \
--cc=emacs-pretest-bug@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.