unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* font-lock-extend-region-multiline: Args out of range: 0, 0
@ 2008-04-08  2:35 an0
  2008-04-08  6:04 ` David Hansen
  2008-04-08  9:29 ` Alan Mackenzie
  0 siblings, 2 replies; 7+ messages in thread
From: an0 @ 2008-04-08  2:35 UTC (permalink / raw)
  To: emacs-devel

I met this error when I use `smart-compile' on a cpp file.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: font-lock-extend-region-multiline: Args out of range: 0, 0
  2008-04-08  2:35 font-lock-extend-region-multiline: Args out of range: 0, 0 an0
@ 2008-04-08  6:04 ` David Hansen
  2008-04-08  9:29 ` Alan Mackenzie
  1 sibling, 0 replies; 7+ messages in thread
From: David Hansen @ 2008-04-08  6:04 UTC (permalink / raw)
  To: emacs-devel

On Tue, 8 Apr 2008 10:35:57 +0800 an0 wrote:

> I met this error when I use `smart-compile' on a cpp file.

To be a bit more precise:  emacs -Q and just M-x compile something (few
ours old HEAD).

Debugger entered--Lisp error: (args-out-of-range 0 0)
  get-text-property(0 font-lock-multiline)
  font-lock-extend-region-multiline()
  font-lock-default-fontify-region(0 0 nil)
  font-lock-fontify-region(0 0)
  font-lock-after-change-function(1 11 0)
  compilation-start("make -k " nil)
  compile("make -k " nil)
  call-interactively(compile t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)



David





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: font-lock-extend-region-multiline: Args out of range: 0, 0
  2008-04-08  2:35 font-lock-extend-region-multiline: Args out of range: 0, 0 an0
  2008-04-08  6:04 ` David Hansen
@ 2008-04-08  9:29 ` Alan Mackenzie
  2008-04-08  9:36   ` David Hansen
  1 sibling, 1 reply; 7+ messages in thread
From: Alan Mackenzie @ 2008-04-08  9:29 UTC (permalink / raw)
  To: an0; +Cc: emacs-devel

Hi, an0!

On Tue, Apr 08, 2008 at 10:35:57AM +0800, an0 wrote:
> I met this error [font-lock-extend-region-multiline: Args out of
> range: 0, 0] when I use `smart-compile' on a cpp file.

That could be my fault.

I don't know what `smart-compile' is.  (I probably should, though).

Could you please give a few more details about how to recreate this bug.
Could you supply a CPP file (preferably short), in which this problem
happens.  Please state which version of Emacs you got the error in (was
it a recent CVS version?)  Do C-c C-b (`c-submit-bug-report') to dump
your CC Mode configuration, and paste it into the email.  Then please
say _exactly_ what you do to get to the error.

Thanks in advance!

-- 
Alan Mackenzie (Nuremberg, Germany).




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: font-lock-extend-region-multiline: Args out of range: 0, 0
  2008-04-08  9:29 ` Alan Mackenzie
@ 2008-04-08  9:36   ` David Hansen
  2008-04-08 13:11     ` Alan Mackenzie
  0 siblings, 1 reply; 7+ messages in thread
From: David Hansen @ 2008-04-08  9:36 UTC (permalink / raw)
  To: emacs-devel

On Tue, 8 Apr 2008 09:29:44 +0000 Alan Mackenzie wrote:

> Could you please give a few more details

Look at my reply, seems to be the same error message, or short: just
emacs -Q and M-x compile some file.

GNU Emacs 23.0.60.4 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2008-04-08 on robotron





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: font-lock-extend-region-multiline: Args out of range: 0, 0
  2008-04-08 13:11     ` Alan Mackenzie
@ 2008-04-08 13:10       ` an0
  2008-04-08 22:12       ` Johan Bockgård
  1 sibling, 0 replies; 7+ messages in thread
From: an0 @ 2008-04-08 13:10 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

Yes, it occurs in trunk head.
And it seems you've figure out the cause so that I'm not giving any
more detailed information here.
Hope you and Stefan could fix this asap.
Thanks.

On Tue, Apr 8, 2008 at 9:11 PM, Alan Mackenzie <acm@muc.de> wrote:
> Hi, Stefan and Emacs!
>
>
>  > On Tue, Apr 08, 2008 at 10:35:57AM +0800, an0 wrote:
>  >> I met this error [font-lock-extend-region-multiline: Args out of
>  >> range: 0, 0] when I use `smart-compile' on a cpp file.
>
>  This error happens in very recent CVS Emacsen because CC Mode has just
>  started using font-lock-after-change-extend-region-function.  This
>  variable is not buffer local, and it thus fouled up the compilation log
>  buffer.
>
>  Stefan, this variable was originally buffer local.  When you moved it
>  from font-core.el V1.41 to font-lock.el V1.299 on 2006-08-01, you
>  removed the buffer locality (modifying the doc string to indicate this).
>  Can you remember why?
>
>  I can't see any reason why it would ever be useful for
>  font-lock-after-change-extend-region-function not to be buffer local.  I
>  think it would be best to make it buffer local in font-lock.el.
>
>  --
>  Alan Mackenzie (Nuremberg, Germany).
>




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: font-lock-extend-region-multiline: Args out of range: 0, 0
  2008-04-08  9:36   ` David Hansen
@ 2008-04-08 13:11     ` Alan Mackenzie
  2008-04-08 13:10       ` an0
  2008-04-08 22:12       ` Johan Bockgård
  0 siblings, 2 replies; 7+ messages in thread
From: Alan Mackenzie @ 2008-04-08 13:11 UTC (permalink / raw)
  To: Stefan Monnier, emacs-devel; +Cc: an0

Hi, Stefan and Emacs!

> On Tue, Apr 08, 2008 at 10:35:57AM +0800, an0 wrote:
>> I met this error [font-lock-extend-region-multiline: Args out of
>> range: 0, 0] when I use `smart-compile' on a cpp file.

This error happens in very recent CVS Emacsen because CC Mode has just
started using font-lock-after-change-extend-region-function.  This
variable is not buffer local, and it thus fouled up the compilation log
buffer.

Stefan, this variable was originally buffer local.  When you moved it
from font-core.el V1.41 to font-lock.el V1.299 on 2006-08-01, you
removed the buffer locality (modifying the doc string to indicate this).
Can you remember why?

I can't see any reason why it would ever be useful for
font-lock-after-change-extend-region-function not to be buffer local.  I
think it would be best to make it buffer local in font-lock.el.

-- 
Alan Mackenzie (Nuremberg, Germany).




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: font-lock-extend-region-multiline: Args out of range: 0, 0
  2008-04-08 13:11     ` Alan Mackenzie
  2008-04-08 13:10       ` an0
@ 2008-04-08 22:12       ` Johan Bockgård
  1 sibling, 0 replies; 7+ messages in thread
From: Johan Bockgård @ 2008-04-08 22:12 UTC (permalink / raw)
  To: emacs-devel

Alan Mackenzie <acm@muc.de> writes:

> I can't see any reason why it would ever be useful for
> font-lock-after-change-extend-region-function not to be buffer local.

I agree, but

    There are several variables that control how Font Lock mode
    highlights text.  But major modes should not set any of these
    variables directly.  Instead, they should set `font-lock-defaults'
    as a buffer-local variable.  The value assigned to this variable is
    used, if and when Font Lock mode is enabled, to set all the other
    variables.

This will DTRT.

-- 
Johan Bockgård





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-04-08 22:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-08  2:35 font-lock-extend-region-multiline: Args out of range: 0, 0 an0
2008-04-08  6:04 ` David Hansen
2008-04-08  9:29 ` Alan Mackenzie
2008-04-08  9:36   ` David Hansen
2008-04-08 13:11     ` Alan Mackenzie
2008-04-08 13:10       ` an0
2008-04-08 22:12       ` Johan Bockgård

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).