[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: font locking problem

From: Alan Mackenzie
Subject: Re: font locking problem
Date: Wed, 5 May 2004 07:14:31 +0000
User-agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686))

Lowell Kirsh <address@hidden> wrote on Mon, 03 May 2004 19:32:26 -0700:
> I am having emacs problems. First, here is my entire .emacs file:

> (require 'font-lock)
> (require 'lazy-lock)
> (global-font-lock-mode t)
> (setq font-lock-support-mode 'lazy-lock-mode)

Would you tell us your Emacs version number (M-x emacs-version) and your
CC Mode version number (M-x c-version), please.

> Now here's my problem: I start up (GNU) emacs and then try to visit a 
> java file. The computer beeps and in the minibuffer it says:

> "Wrong type argument: integer-or-marker-p, nil"

That's an internal coding error, probably in CC Mode.  Try setting
`debug-on-error'  (M-: (setq debug-on-error t)), then visit the file
again.  That should give a stack dump.

> and doesn't display the file on the screen. But when I do a C-x b, it 
> shows that the file has been loaded into a buffer. And there's one more 
> problem - the java file buffer thinks it's been modified, even though it 
> hasn't. When visiting that buffer, I try to undo but there is "no more 
> undo information".

What's happening here is that it's started the font locking, but not
finished it.  Font locking works by adding "text properties" (for example
"red text on black background") to bits of the buffer.  Changing text
properties counts as changing the buffer (unfortunately, in my view).
Each time font locking has done its bit, it rubs out the "buffer-changed"
mark.  Font locking also takes steps to prevent these text-property
changes going onto the undo list, because they're not what people
typically want to undo.  Because the font locking has crashed, it leaves
the buffer in a "changed" state.

> Any ideas? This seems like a bug to me, but I don't want to jump to 
> conclusions too soon.

Oh, it's definitely a bug.  :-)  The solution is likely to be along the
lines "please upgrade to ..... version ...., which can be downloaded from

> Lowell

Alan Mackenzie (Munich, Germany)
Email: address@hidden; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").

reply via email to

[Prev in Thread] Current Thread [Next in Thread]