From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#36492: c-mode fails with errors during fontification Date: Mon, 08 Jul 2019 00:52:02 +0300 Organization: LINKOV.NET Message-ID: <871rz15xp1.fsf@mail.linkov.net> References: <20190706142748.85417.qmail@mail.muc.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="194410"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 36492@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 08 00:02:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkFEa-000oPC-7L for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Jul 2019 00:02:12 +0200 Original-Received: from localhost ([::1]:37170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkFEY-0006ug-L0 for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Jul 2019 18:02:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50012) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkFET-0006uK-JE for bug-gnu-emacs@gnu.org; Sun, 07 Jul 2019 18:02:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkFES-0002nh-H8 for bug-gnu-emacs@gnu.org; Sun, 07 Jul 2019 18:02:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48688) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkFEQ-0002jx-M0; Sun, 07 Jul 2019 18:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkFEQ-0000zk-H8; Sun, 07 Jul 2019 18:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 07 Jul 2019 22:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36492 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 36492-submit@debbugs.gnu.org id=B36492.15625369203815 (code B ref 36492); Sun, 07 Jul 2019 22:02:02 +0000 Original-Received: (at 36492) by debbugs.gnu.org; 7 Jul 2019 22:02:00 +0000 Original-Received: from localhost ([127.0.0.1]:57509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkFEO-0000zT-Bg for submit@debbugs.gnu.org; Sun, 07 Jul 2019 18:02:00 -0400 Original-Received: from brown.elm.relay.mailchannels.net ([23.83.212.23]:4349) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hkFEM-0000zK-3M for 36492@debbugs.gnu.org; Sun, 07 Jul 2019 18:01:59 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 89DCF1A1485; Sun, 7 Jul 2019 22:01:56 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a86.g.dreamhost.com (100-96-14-11.trex.outbound.svc.cluster.local [100.96.14.11]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 0F98C1A1F7D; Sun, 7 Jul 2019 22:01:56 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a86.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.3); Sun, 07 Jul 2019 22:01:56 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Zesty-Illustrious: 266acaa96da7767a_1562536916329_2499528085 X-MC-Loop-Signature: 1562536916329:3574246849 X-MC-Ingress-Time: 1562536916328 Original-Received: from pdx1-sub0-mail-a86.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a86.g.dreamhost.com (Postfix) with ESMTP id 48FA08016A; Sun, 7 Jul 2019 15:01:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=jv3+Zk5q4Fl0W2ZNhiu8whhmkj0=; b= P+BolK3TrwB214TCuV2vJEoJSSwJCDSltxqqgcgjLIhG2kmxqshmTL/zh0vWqOpF MOqaDpEhn0XT4UP3n2slW5Cp4EhuR5HNj1/T6Kr7YoaCrQD2QVCUTyezMw2MCAvd qoSo4A/5GenuSdT2dBFoIgY3pYwCGeoQXLcYo5mGoqo= Original-Received: from mail.jurta.org (m91-129-109-127.cust.tele2.ee [91.129.109.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a86.g.dreamhost.com (Postfix) with ESMTPSA id 16BBF8016F; Sun, 7 Jul 2019 15:01:51 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a86 In-Reply-To: <20190706142748.85417.qmail@mail.muc.de> (Alan Mackenzie's message of "6 Jul 2019 14:27:48 -0000") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrfeelgddtvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdelrdduvdejnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtledruddvjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegrtghmsehmuhgtrdguvgenucevlhhushhtvghrufhiiigvpedt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162302 Archived-At: >>> Opening this message in Gnus fails with the following backtrace >>> because c-mode fails to fontify the attachment. > >> Actually, with the attachment in this message the bug in c-mode >> font-lock is much easier to reproduce. > > That is one ugly piece of erroneous C. ;-) > > What triggers the bug is the ) without a preceding (. A variable > recording the position of the opening ( is still set to nil, and we > tried to use it in the given buffer with the unbalanced ). > >> [-- text/x-csrc, encoding 7bit, charset: US-ASCII, 3 lines, name: test.c --] > > The following patch fixes it, I hope. Would you please do the usual, > and confirm that it does indeed fix the bug (or tell me what's still > wrong). Thanks, Alan. Now there is no error anymore. I wonder if ignore-errors around font-lock-ensure in mm-display-inline-fontify is still necessary to ensure no more bugs in other modes disrupt Gnus by erroneous code in attachments? Or maybe raising such errors will help to find fontification bugs sooner?