From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#72126: closed (Bug#72126 fixed: v29.2 Java FontLock mode weirdness ?) Date: Fri, 26 Jul 2024 16:00:48 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="tw1aZ99+rpTHKe1b" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30613"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, Eli Zaretskii , 72126@debbugs.gnu.org, emacs-devel@gnu.org, jason.vas.dias@pttireland.ie To: Jason Vas Dias , jason.vas.dias@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 26 18:02:30 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sXNOo-0007rI-Bk for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Jul 2024 18:02:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sXNOH-0001Nf-0M; Fri, 26 Jul 2024 12:01:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sXNOD-0001Fw-KX for bug-gnu-emacs@gnu.org; Fri, 26 Jul 2024 12:01:53 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sXNOD-0004gi-Ao for bug-gnu-emacs@gnu.org; Fri, 26 Jul 2024 12:01:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sXNOL-0001Zn-SE for bug-gnu-emacs@gnu.org; Fri, 26 Jul 2024 12:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Jul 2024 16:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72126 X-GNU-PR-Package: emacs Original-Received: via spool by 72126-submit@debbugs.gnu.org id=B72126.17220096675993 (code B ref 72126); Fri, 26 Jul 2024 16:02:01 +0000 Original-Received: (at 72126) by debbugs.gnu.org; 26 Jul 2024 16:01:07 +0000 Original-Received: from localhost ([127.0.0.1]:39895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXNNS-0001Yb-I7 for submit@debbugs.gnu.org; Fri, 26 Jul 2024 12:01:06 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:13571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXNNQ-0001Xy-D0 for 72126@debbugs.gnu.org; Fri, 26 Jul 2024 12:01:05 -0400 Original-Received: (qmail 79798 invoked by uid 3782); 26 Jul 2024 18:00:49 +0200 Original-Received: from muc.de (pd953a12b.dip0.t-ipconnect.de [217.83.161.43]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 26 Jul 2024 18:00:49 +0200 Original-Received: (qmail 8781 invoked by uid 1000); 26 Jul 2024 16:00:48 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289372 Archived-At: --tw1aZ99+rpTHKe1b Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, Jason. On Fri, Jul 26, 2024 at 14:26:37 +0100, Jason Vas Dias wrote: > Good day Alan, Eli, all - > Thank you for submitting a patch for this - as you stated : > > Anyhow, here's the patch. Please apply it to > > ..../lisp/progmodes/cc-engine.el in your Emacs directory, and then byte > > compile the patched file, then load it (or start Emacs afresh). Please > > test out the patched CC Mode with your real Java code, and confirm to me > > that the bug has indeed been fixed. If you want any help with the > > patching or byte compilation, feel free to send me private email. > > I'm taking it that the patch works OK. I've committed it to the > > emacs-30 release branch, from where it will find it way to the master > > branch in the next few days > I'd very much like to test your patch, ie. get an Emacs which fixes > this problem, which is most annoying when editing large amounts of Java. > But I could find no attached patch in any of your emails to me or on the bug > report. The patch was actually inline in my email from 2024-07-14 rather than being an attached file. It is easier to read and comment on patches this way unless they are big. Normally, patch is good (in fact, astoundingly good) at ignoring irrelevant text, so all you need to do is save the email to a file ~/foo.patch, followed by $ cd .../lisp/progmodes $ patch < ~/foo.patch .. However, I'm attaching the patch to this mail again, anyway. > Please could you send me either : > A) The patch, against Emacs 30 (devel branch) - > I can backport to v29.4 version Will do. > or > B) A link to the correct GIT repo, and a Commit Reference ID - again, > I can backport to v29.4 The commit to the emacs-30 branch was: commit caf7426f0ca280b7cf40736e595cad8f7361152f (HEAD -> emacs-30) Author: Alan Mackenzie Date: Mon Jul 22 12:24:43 2024 +0000 FIx spurious fontification of variable in Java Mode > or > C) The complete cc-engine.el from v29.4 with patch applied. > On receipt, I will test and let you know the results. Thanks! > Thank You & Best Regards, > Jason -- Alan Mackenzie (Nuremberg, Germany). --tw1aZ99+rpTHKe1b Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="diff.20240714.diff" diff -r aba0055b21e4 cc-engine.el --- a/cc-engine.el Mon Jul 01 20:21:18 2024 +0000 +++ b/cc-engine.el Sun Jul 14 20:21:48 2024 +0000 @@ -8794,6 +8794,7 @@ ;; This function might do hidden buffer changes. (let ((start (point)) + (old-record-type-identifiers c-record-type-identifiers) (old-found-types (copy-hash-table c-found-types)) ;; If `c-record-type-identifiers' is set then activate ;; recording of any found types that constitute an argument in @@ -8830,7 +8831,8 @@ (nconc c-record-found-types c-record-type-identifiers))) t) - (setq c-found-types old-found-types) + (setq c-record-type-identifiers old-record-type-identifiers + c-found-types old-found-types) (goto-char start) nil)))) --tw1aZ99+rpTHKe1b--