From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#6952: jit-lock with default, small chunk-size causing incorrect fontification in cc-mode Date: Mon, 30 Aug 2010 16:52:45 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=0016364c7e373e7125048f132952 X-Trace: dough.gmane.org 1283213398 3666 80.91.229.12 (31 Aug 2010 00:09:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 Aug 2010 00:09:58 +0000 (UTC) To: 6952@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 31 02:09:52 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OqEQB-0002NR-DR for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Aug 2010 02:09:51 +0200 Original-Received: from localhost ([127.0.0.1]:42836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqEQA-00058q-K7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Aug 2010 20:09:50 -0400 Original-Received: from [140.186.70.92] (port=37620 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqEQ0-00056z-Rc for bug-gnu-emacs@gnu.org; Mon, 30 Aug 2010 20:09:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqEPz-00029D-NL for bug-gnu-emacs@gnu.org; Mon, 30 Aug 2010 20:09:40 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52532) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqEPz-000299-M5 for bug-gnu-emacs@gnu.org; Mon, 30 Aug 2010 20:09:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OqE8v-00013C-Lh; Mon, 30 Aug 2010 19:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Aug 2010 23:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6952 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.12832122764029 (code B ref -1); Mon, 30 Aug 2010 23:52:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Aug 2010 23:51:16 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqE8B-00012w-M4 for submit@debbugs.gnu.org; Mon, 30 Aug 2010 19:51:15 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqE89-00012r-Mv for submit@debbugs.gnu.org; Mon, 30 Aug 2010 19:51:14 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:55920) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OqE9i-0008NZ-8F for submit@debbugs.gnu.org; Mon, 30 Aug 2010 19:52:50 -0400 Original-Received: from [140.186.70.92] (port=35218 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqE9g-00019H-Rg for bug-gnu-emacs@gnu.org; Mon, 30 Aug 2010 19:52:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqE9f-0007zb-Ob for bug-gnu-emacs@gnu.org; Mon, 30 Aug 2010 19:52:48 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:32787) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqE9f-0007zK-KZ for bug-gnu-emacs@gnu.org; Mon, 30 Aug 2010 19:52:47 -0400 Original-Received: by wyb36 with SMTP id 36so8743610wyb.0 for ; Mon, 30 Aug 2010 16:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=a1rAVMuBl86xjuvvA5fBJFiHGZV8WrQJMvk0Sc66Krk=; b=gU04u3P9tpy/lrVI0ZKar9gQkbM3+St4Yyp4pIm0J+sv/bF2imdtDwxxy2zXDDDA4H GA1zme0p2L5BhcgLYnT3U+kv4SB8wNFBbzcAYOBK/10Upkxx+vEWcS1y5I0kI4ybNCas oR+XYTUCWtYHaBem1AFSLcAQkWXP5yc1SvKsk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=SXuY5ahP4o/0YZdgfqMsFeNark0vxDtJZpAA3TPBpArM5phSEQVEH8PK87wV0a0jBc FDmaHN9oU0E2o6TGrVxvTSf9VGCkKzV+KalDzsgh/0kNE6RiY7jJXbW0U0d7m5gl9/qr CF+TVSoCVxEAivsA+RrMVzpksFc9Vr4yLoK6c= Original-Received: by 10.216.22.203 with SMTP id t53mr5641713wet.37.1283212365950; Mon, 30 Aug 2010 16:52:45 -0700 (PDT) Original-Received: by 10.216.12.73 with HTTP; Mon, 30 Aug 2010 16:52:45 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 30 Aug 2010 19:52:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39846 Archived-At: --0016364c7e373e7125048f132952 Content-Type: text/plain; charset=ISO-8859-1 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. --0016364c7e373e7125048f132952 Content-Type: application/octet-stream; name="foo.c" Content-Disposition: attachment; filename="foo.c" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gdhzh1jx0 ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAg CiAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAg ICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAKCnR5cGUKYWJjYWJjYWJjYWJjYWJjYWJjYWJj ICgKICAgICAgICAgICAgICB0eXBldHlwZXR5cGV0eSBwYXJhbXBhcmFtcGEsCiAgICAgICAgICAg ICAgdHlwZXQqIHBhcmFtcGFyYW1wYXJhbSk7Cgp0eXBlCmRzZmxrYWpma2xhZmpkYXNsa2ZqYXNm ZGQgKAogICAgICAgICAgICAgIHR5cGV0eXBldHlwZXR5IHBhcmFtcGFyYW1wYSwKICAgICAgICAg ICAgICB0eXBldCogcGFyYW1wYXJhbXBhcmFtKTsKCnR5cGUKdmN4a3p2anhjZGZsYXNmZHNhZmR0 ICgKICAgICAgICAgdHlwZXR5cGV0eXBldHlwZXR5cGV0IHBhcmFtLAogICAgICAgICB0eXBldCBw YXJhbXBhcmFtcCwKICAgICAgICAgdHlwZXQqIHBhcmFtcGFyYW1wYXJhbXBhCiAgICApOwoK --0016364c7e373e7125048f132952--