all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* comments are not highlighted
@ 2003-09-16  2:53 Prem Mallappa
  2003-09-17 13:10 ` Stefan Monnier
  2003-09-17 16:30 ` Rob Thorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Prem Mallappa @ 2003-09-16  2:53 UTC (permalink / raw)



Hi 

i opened file /usr/src/kernel-source-2.xxx/drivers/net/eepro100.c

which has arround 150 lines of comments. at line 184 or so.. . Emacs stops
changing the color (global-font-lock-mode) of comments after certain point
( 100 lines or so) after that it shows the comments as normal text and
highlights the keywords such as "do" "for" etc.. 

One more thing i noticed i selected whole buffer and said "indent-region"
Now everything is fine..
Why emacs is unable to see the comments as *comments*
I am running 21.3.1

prem

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

* Re: comments are not highlighted
  2003-09-16  2:53 comments are not highlighted Prem Mallappa
@ 2003-09-17 13:10 ` Stefan Monnier
  2003-09-17 16:30 ` Rob Thorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2003-09-17 13:10 UTC (permalink / raw)


> which has arround 150 lines of comments. at line 184 or so.. . Emacs stops
> changing the color (global-font-lock-mode) of comments after certain point
> ( 100 lines or so) after that it shows the comments as normal text and
> highlights the keywords such as "do" "for" etc..

My crystal ball says that you have an open-paren or open-bracket or
open-brace in column 0 somewhere inside your 150-lines-long comment.

Emacs thinks this indicates a "beginning of defun" and thus assumes
it's not inside a comment.  This heuristic is used in some cases but not
all the time, so the highlighting will sometimes be correct and sometimes
not depending on where the font-locking has started (since you're
presumably using jit-lock which highlights the buffer on the fly in small
increments).


        Stefan

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

* Re: comments are not highlighted
  2003-09-16  2:53 comments are not highlighted Prem Mallappa
  2003-09-17 13:10 ` Stefan Monnier
@ 2003-09-17 16:30 ` Rob Thorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Thorpe @ 2003-09-17 16:30 UTC (permalink / raw)


Prem Mallappa <prem_mallappa@hotpop.com> wrote in message news:<pan.2003.09.16.02.53.46.977248@hotpop.com>...
> Hi 
> 
> i opened file /usr/src/kernel-source-2.xxx/drivers/net/eepro100.c
> 
> which has arround 150 lines of comments. at line 184 or so.. . Emacs stops
> changing the color (global-font-lock-mode) of comments after certain point
> ( 100 lines or so) after that it shows the comments as normal text and
> highlights the keywords such as "do" "for" etc.. 
> 
> One more thing i noticed i selected whole buffer and said "indent-region"
> Now everything is fine..
> Why emacs is unable to see the comments as *comments*
> I am running 21.3.1

Got no idea what causes that, but M-x lazy-lock-mode RET fixes it
Bug in jit lock?  I don't even know if its gauranteed to work in all situations.

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

end of thread, other threads:[~2003-09-17 16:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-16  2:53 comments are not highlighted Prem Mallappa
2003-09-17 13:10 ` Stefan Monnier
2003-09-17 16:30 ` Rob Thorpe

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.