GNU bug report logs -
#39972
28.0.50; which-function no longer returning current Java method in Emacs 27
Previous Next
Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>
Date: Sat, 7 Mar 2020 13:09:02 UTC
Severity: normal
Found in version 28.0.50
Done: Philipp Stephani <p.stephani2 <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello, Eli.
On Thu, May 21, 2020 at 22:14:24 +0300, Eli Zaretskii wrote:
> > Date: Thu, 21 May 2020 17:42:11 +0000
> > Cc: Philipp Stephani <p.stephani2 <at> gmail.com>, 39972 <at> debbugs.gnu.org
> > From: Alan Mackenzie <acm <at> muc.de>
> > > Is it possible to come up with something simpler for emacs-27?
> > I think the change (in master) to CC Mode's value of
> > add-log-current-defun could be put into emacs-27 on its own. This should
> > be safe.
> > The patch which made this change (bug #39972) was:
> > 5989432d15feb4439e759d2c0e28233ca22a7604
> > "CC Mode: Fix bug #39972, by fixing c-display-defun-name for nested
> > defuns"
> > Date: Wed May 20 19:02:26 2020 +0000.
> > What do you say to putting this into emacs-27?
> If it fixes the problem reported in this bug report, it's fine by me
> to cherry-pick it to emacs-27.
I've just tried it, and it almost fixes the problem. :-(
With that commit cherry-picked to emacs-27, visit the Java file:
class Foo {
void bar() {
// body
}
}
, and enable which-function-mode. When point is within class Foo or bar,
which-function-mode reports "class Foo" or "bar" correctly.
But when point is _after_ the terminating brace of class Foo, "bar" is
wrongly reported. I now remember that this is the reason for my
amendment to which-func.el.
Sorry to trouble you with such a minor point, but I'm unable to decide
myself whether such a small bug should prevent the cherry-picking of
5989432 into emacs-27. I'm leaning towards doing the cherry-pick.
So, please help me by making the decision. Thanks!
> Thanks.
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 4 years and 359 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.