[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as parenthes
From: |
Alan Mackenzie |
Subject: |
bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as parentheses |
Date: |
Thu, 2 May 2024 10:24:23 +0000 |
Hello, Eli and Géza.
On Thu, May 02, 2024 at 12:30:32 +0300, Eli Zaretskii wrote:
> > From: Herman, Géza <geza.herman@gmail.com>
> > Cc: Herman Géza <geza.herman@gmail.com>,
> > 70435@debbugs.gnu.org, Eli
> > Zaretskii <eliz@gnu.org>
> > Date: Mon, 29 Apr 2024 19:21:01 +0200
> > Hello Alan,
> > Alan Mackenzie <acm@muc.de> writes:
> > > I have a fix, I think. It is actually a two line fix, removing
> > > a test
> > > from the top of a function, but it involves reindenting the
> > > entire rest
> > > of the function.
> > > Please apply the patch below, recompile cc-engine.el, then load
> > > the
> > > resulting CC Mode into a running Emacs. Please test it on your
> > > real C++
> > > code, and let me know if the bug is actually fixed. Thanks!
> > I can confirm that the patch fixes the issue, I tested it in real
> > circumstances.
> > Thanks for fixing the problem so quickly!
> Alan, should this bug be closed now?
Apologies for my dithering. I've been having second thoughts about the
patch in the last few days, and wondering whether I should refine it.
It's all to do with a function c-unmark-<>-around-region, which was run
in before-change-functions for a deletion, and after-change-functions for
an insertion. The patch I sent to Géza made that function run in before-
and after-c-f both for insertions and deletions.
I've been wondering whether that is strictly necessary, since it will
slow down CC Mode a little. I'm thinking that in the
insertion/before-c-f case, I might not need the call.
Géza, would you be prepared to do a little more testing if I modified the
patch?
--
Alan Mackenzie (Nuremberg, Germany).