From unknown Tue Sep 09 13:03:05 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#6952 <6952@debbugs.gnu.org> To: bug#6952 <6952@debbugs.gnu.org> Subject: Status: jit-lock with default, small chunk-size causing incorrect fontification in cc-mode Reply-To: bug#6952 <6952@debbugs.gnu.org> Date: Tue, 09 Sep 2025 20:03:05 +0000 retitle 6952 jit-lock with default, small chunk-size causing incorrect font= ification in cc-mode reassign 6952 emacs,cc-mode submitter 6952 Daniel Colascione severity 6952 normal tag 6952 unreproducible thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 30 19:51:15 2010 Received: (at submit) by debbugs.gnu.org; 30 Aug 2010 23:51:16 +0000 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 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 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 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 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= MIME-Version: 1.0 Received: by 10.216.22.203 with SMTP id t53mr5641713wet.37.1283212365950; Mon, 30 Aug 2010 16:52:45 -0700 (PDT) Received: by 10.216.12.73 with HTTP; Mon, 30 Aug 2010 16:52:45 -0700 (PDT) Date: Mon, 30 Aug 2010 16:52:45 -0700 Message-ID: Subject: jit-lock with default, small chunk-size causing incorrect fontification in cc-mode From: Daniel Colascione To: bug-gnu-emacs@gnu.org Content-Type: multipart/mixed; boundary=0016364c7e373e7125048f132952 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-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) --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-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 31 06:12:50 2010 Received: (at 6952) by debbugs.gnu.org; 31 Aug 2010 10:12:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqNpc-0005Wy-Iy for submit@debbugs.gnu.org; Tue, 31 Aug 2010 06:12:50 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqNpI-0005Wj-Bm for 6952@debbugs.gnu.org; Tue, 31 Aug 2010 06:12:42 -0400 Received: from ceviche.home (vpn-132-204-232-70.acd.umontreal.ca [132.204.232.70]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o7VADud6028171; Tue, 31 Aug 2010 06:13:56 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 6C4E6660DF; Tue, 31 Aug 2010 12:13:55 +0200 (CEST) From: Stefan Monnier To: Daniel Colascione Subject: Re: bug#6952: jit-lock with default, small chunk-size causing incorrect fontification in cc-mode In-Reply-To: (Daniel Colascione's message of "Mon, 30 Aug 2010 16:52:45 -0700") Date: Tue, 31 Aug 2010 10:29:35 +0200 Message-ID: References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3611=0 X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 6952 Cc: 6952@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 29 19:05:48 2018 Received: (at 6952) by debbugs.gnu.org; 29 Jun 2018 23:05:48 +0000 Received: from localhost ([127.0.0.1]:40183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZ2Sa-0002qj-7k for submit@debbugs.gnu.org; Fri, 29 Jun 2018 19:05:48 -0400 Received: from mail-io0-f180.google.com ([209.85.223.180]:42350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZ2SY-0002qP-Hc; Fri, 29 Jun 2018 19:05:47 -0400 Received: by mail-io0-f180.google.com with SMTP id r24-v6so9829120ioh.9; Fri, 29 Jun 2018 16:05:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=FsBCmY9VOFpZw98b1WUPSkQkYI9bRxvGWhzx1WY58Lw=; b=Huh830bfgqcdUbtPYIvpz+8bgoozcZ3YzfAKKqIl550CyWjnSQhcx4wa9Pzviywav0 p+AHLR2kN77W1s6q0hDs/pZi2BsWsP0aCZ6jID502Qp98O9W/yHfAdyuybTwTQKYZA1v TdXu7GuWRGBq4yNpjGxoG/gQJfAA6sKingz0ltshDlJjxyeUQM9ZT25/v2S/LfICmP0+ iJXBkjDwRF2ZieHkR4EssIe6AJgj23xRTEQnLzbNiGh4Zi62wJbChJSnDDK1ybImzcf6 oK9XLVFGCfoJ9iRgtSAYT6sNkMzLHkcjo19tr3sh8ETvW/22jvytWK5Vi8BgS6ycFaeV 2+Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=FsBCmY9VOFpZw98b1WUPSkQkYI9bRxvGWhzx1WY58Lw=; b=Faq6YIeVGK9M0b9QtK4FoWwGqn+ozb3CL4yu2k3pfIIHVfnAMXLU8hqKPcDLtN51V7 zw/m89T3PKxSNnTYdAO0oGUJQJG40/yyqMj4vG5Yngj30x8VyNasVbqUY59ivyF+rd0N Ca9pl9ukv43muPyl31PXGt2Vx/15V1oMgFt6uZXjcLRMu1qyGBs+iDo9snSSAyyC2fQx 2357isu23tm1yCI3QkABXIfwS7gu1yzP6UU2Dnrg0l/l5sFGIAabFpWyBgRA0xIdfq6e I/JT4laj+7PquvbNu/uflj6yBEjPB5IK7d874lU29zlT0X3k7s9Wt5g2Hy75/A5SLttd Hn3w== X-Gm-Message-State: APt69E0svQ0kuKy7kLmGQPjubIGoIAl/R7C8x7SVPwDACjC/0vF45eiZ 2uto/wrnxXy+Se2ZO51LYSjvfg== X-Google-Smtp-Source: AAOMgpdJv6Aggh8EXIf1f/7kJAaQlqE+e5T7wIzXUbqsh7Xmw6WhOV9iN6WPqxulpVeJyWkFwrVDMg== X-Received: by 2002:a6b:5a15:: with SMTP id o21-v6mr13129435iob.134.1530313541060; Fri, 29 Jun 2018 16:05:41 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id p67-v6sm4997935iop.40.2018.06.29.16.05.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jun 2018 16:05:40 -0700 (PDT) From: Noam Postavsky To: Daniel Colascione Subject: Re: bug#6952: jit-lock with default, small chunk-size causing incorrect fontification in cc-mode References: Date: Fri, 29 Jun 2018 19:05:38 -0400 In-Reply-To: (Daniel Colascione's message of "Mon, 30 Aug 2010 16:52:45 -0700") Message-ID: <87y3exmbwd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 6952 Cc: 6952@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 6952 + unreproducible quit Daniel Colascione 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). From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 26 07:12:01 2019 Received: (at 6952-done) by debbugs.gnu.org; 26 Sep 2019 11:12:02 +0000 Received: from localhost ([127.0.0.1]:42766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDRgn-0002ak-LB for submit@debbugs.gnu.org; Thu, 26 Sep 2019 07:12:01 -0400 Received: from mail-pg1-f181.google.com ([209.85.215.181]:36879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDRgk-0002aG-Ox for 6952-done@debbugs.gnu.org; Thu, 26 Sep 2019 07:11:59 -0400 Received: by mail-pg1-f181.google.com with SMTP id c17so1403226pgg.4 for <6952-done@debbugs.gnu.org>; Thu, 26 Sep 2019 04:11:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=pK/ldW8s8jcj1S10TikVv/QdhYBYZElHMyeRsITWJDM=; b=J2LgN4zngTBDcppN6StpsaQCtTb5ZGgGrZh2EzCZtsqOFtLEnK+xxqboejL9dnbWfA 0yS8GOSOw3FKQZOfxghpgWTRV6L2pCbI1fYZ00DX9nogwuuamff2We6m6srbPn9NVi8o ECBqPxCQ30gjlQkDtqz6z8GQotmXbg4iN+fmDbnZFwgMBeTrHxv2pi/2zYo/Po/ipuv0 QY+vIfKcBmZqc/Pi1f5DIxJ2oIfFMaesHoni6wrtrl9+0+vU03Lc7gfOv2kt9sctJTI1 LSxGvLfeUfmvPxVRmX2gv7oqTbO+cKcOULBwnDF43dPqIlaB9x5hmNL/uR1MzuIjK5sg i2+Q== X-Gm-Message-State: APjAAAU3xM/K1JbjztQt1M/PerjoSIw305S1frb2a0Q7Y8DMtJC5d5vn xRgBKaxx05XNpjbNSF8PxWdfDriEUaP38Bay4sM= X-Google-Smtp-Source: APXvYqya3SrRnvMM2f94tYsG+PcZJnK6td2koWYanktzpRSKuG4dnGdhJF8BLJZFh2YXuBlYTFkwdCw76gn5qao5xN4= X-Received: by 2002:a17:90a:1150:: with SMTP id d16mr3096853pje.2.1569496310837; Thu, 26 Sep 2019 04:11:50 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Thu, 26 Sep 2019 13:11:39 +0200 Message-ID: Subject: Re: bug#6952: jit-lock with default, small chunk-size causing incorrect fontification in cc-mode To: Noam Postavsky Content-Type: multipart/alternative; boundary="00000000000015780d059372d6ad" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 6952-done Cc: 6952-done@debbugs.gnu.org, Daniel Colascione X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --00000000000015780d059372d6ad Content-Type: text/plain; charset="UTF-8" Noam Postavsky writes: > tags 6952 + unreproducible > quit > > Daniel Colascione 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 --00000000000015780d059372d6ad Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Noam Postavsky <n= postavs@gmail.com> writes:

> tags 6952 + unreproducible> quit
>
> Daniel Colascione <dan.colascione@gmail.com> writes:
>
>&= gt; 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 visit= ed with
>> jit-lock-chunk-size equal to its default 512.
>> I can't reproduce this, neither by setting jit-lock-chunk-size t= o 512,
> nor with the default of 500.=C2=A0 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.= =C2=A0 If anyone is still seeing this on a modern Emacs, please re-open.
Best regards,
Stefan Kangas
--00000000000015780d059372d6ad-- From unknown Tue Sep 09 13:03:05 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 24 Oct 2019 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator