all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6952: jit-lock with default, small chunk-size causing incorrect fontification in cc-mode
@ 2010-08-30 23:52 Daniel Colascione
  2010-08-31  8:29 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Daniel Colascione @ 2010-08-30 23:52 UTC (permalink / raw)
  To: 6952

[-- Attachment #1: Type: text/plain, Size: 537 bytes --]

I've attached a file that demonstrates incorrect fontification with
cc-mode and jit-lock used together -- the last function in the file is
not fontified as a function when a file is first visited with
jit-lock-chunk-size equal to its default 512. If I change that to
32768 or change some of the whitespace in the fiile, fontification is
correct again. I've attached the file because the testcase is
whitespace-sensitive.

Presumably, the underlying cause is jit-lock asking cc-mode to start
or stop fontification in an unexpected place.

[-- Attachment #2: foo.c --]
[-- Type: application/octet-stream, Size: 510 bytes --]

                                
                        
                    
                   
                        
                   

type
abcabcabcabcabcabcabc (
              typetypetypety paramparampa,
              typet* paramparamparam);

type
dsflkajfklafjdaslkfjasfdd (
              typetypetypety paramparampa,
              typet* paramparamparam);

type
vcxkzvjxcdflasfdsafdt (
         typetypetypetypetypet param,
         typet paramparamp,
         typet* paramparamparampa
    );


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

* bug#6952: jit-lock with default, small chunk-size causing incorrect fontification in cc-mode
  2010-08-30 23:52 bug#6952: jit-lock with default, small chunk-size causing incorrect fontification in cc-mode Daniel Colascione
@ 2010-08-31  8:29 ` Stefan Monnier
  2018-06-29 23:05 ` Noam Postavsky
  2019-09-26 11:11 ` Stefan Kangas
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2010-08-31  8:29 UTC (permalink / raw)
  To: Daniel Colascione; +Cc: 6952

> Presumably, the underlying cause is jit-lock asking cc-mode to start
> or stop fontification in an unexpected place.

I doubt the error is in jit-lock, because the assumptions made by
jit-lock.el are almost identical to the ones made by the non-jit-lock
code.  Jit-lock relies more heavily on some of those assumptions, tho,
so it's probably more difficult to reproduce without jit-lock, but
reproducing it without jit-lock might be the best way to debug
the problem.


        Stefan





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

* bug#6952: jit-lock with default, small chunk-size causing incorrect fontification in cc-mode
  2010-08-30 23:52 bug#6952: jit-lock with default, small chunk-size causing incorrect fontification in cc-mode Daniel Colascione
  2010-08-31  8:29 ` Stefan Monnier
@ 2018-06-29 23:05 ` Noam Postavsky
  2019-09-26 11:11 ` Stefan Kangas
  2 siblings, 0 replies; 4+ messages in thread
From: Noam Postavsky @ 2018-06-29 23:05 UTC (permalink / raw)
  To: Daniel Colascione; +Cc: 6952

tags 6952 + unreproducible
quit

Daniel Colascione <dan.colascione@gmail.com> writes:

> I've attached a file that demonstrates incorrect fontification with
> cc-mode and jit-lock used together -- the last function in the file is
> not fontified as a function when a file is first visited with
> jit-lock-chunk-size equal to its default 512.

I can't reproduce this, neither by setting jit-lock-chunk-size to 512,
nor with the default of 500.  The fontification of that file looks fine.
Tested from 24.3 to current master (27.0.50).







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

* bug#6952: jit-lock with default, small chunk-size causing incorrect fontification in cc-mode
  2010-08-30 23:52 bug#6952: jit-lock with default, small chunk-size causing incorrect fontification in cc-mode Daniel Colascione
  2010-08-31  8:29 ` Stefan Monnier
  2018-06-29 23:05 ` Noam Postavsky
@ 2019-09-26 11:11 ` Stefan Kangas
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Kangas @ 2019-09-26 11:11 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 6952-done, Daniel Colascione

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

Noam Postavsky <npostavs@gmail.com> writes:

> tags 6952 + unreproducible
> quit
>
> Daniel Colascione <dan.colascione@gmail.com> writes:
>
>> I've attached a file that demonstrates incorrect fontification with
>> cc-mode and jit-lock used together -- the last function in the file is
>> not fontified as a function when a file is first visited with
>> jit-lock-chunk-size equal to its default 512.
>
> I can't reproduce this, neither by setting jit-lock-chunk-size to 512,
> nor with the default of 500.  The fontification of that file looks fine.
> Tested from 24.3 to current master (27.0.50).

I can't reproduce this either, so I'm closing this bug report.  If anyone
is still seeing this on a modern Emacs, please re-open.

Best regards,
Stefan Kangas

[-- Attachment #2: Type: text/html, Size: 1003 bytes --]

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

end of thread, other threads:[~2019-09-26 11:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-30 23:52 bug#6952: jit-lock with default, small chunk-size causing incorrect fontification in cc-mode Daniel Colascione
2010-08-31  8:29 ` Stefan Monnier
2018-06-29 23:05 ` Noam Postavsky
2019-09-26 11:11 ` Stefan Kangas

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.