[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 23.0.60; M-x compile gives args out of range 0, 0
From: |
Alan Mackenzie |
Subject: |
Re: 23.0.60; M-x compile gives args out of range 0, 0 |
Date: |
Tue, 8 Apr 2008 17:22:27 +0000 |
User-agent: |
Mutt/1.5.9i |
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).
- 23.0.60; M-x compile gives args out of range 0, 0, Jan Djärv, 2008/04/08
- Re: 23.0.60; M-x compile gives args out of range 0, 0, Stefan Monnier, 2008/04/08
- Re: 23.0.60; M-x compile gives args out of range 0, 0, Jan Djärv, 2008/04/08
- Re: 23.0.60; M-x compile gives args out of range 0, 0,
Alan Mackenzie <=
- Re: 23.0.60; M-x compile gives args out of range 0, 0, Stefan Monnier, 2008/04/08
- Re: 23.0.60; M-x compile gives args out of range 0, 0, Alan Mackenzie, 2008/04/08
- Re: 23.0.60; M-x compile gives args out of range 0, 0, Stefan Monnier, 2008/04/08
- Re: 23.0.60; M-x compile gives args out of range 0, 0, Alan Mackenzie, 2008/04/09