all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 39972@debbugs.gnu.org, p.stephani2@gmail.com
Subject: bug#39972: 28.0.50; which-function no longer returning current Java method in Emacs 27
Date: Thu, 21 May 2020 20:19:35 +0000	[thread overview]
Message-ID: <20200521201935.GB12036@ACM> (raw)
In-Reply-To: <83367t5cdr.fsf@gnu.org>

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@gmail.com>, 39972@debbugs.gnu.org
> > From: Alan Mackenzie <acm@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).





  reply	other threads:[~2020-05-21 20:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-07 13:07 bug#39972: 28.0.50; which-function no longer returning current Java method in Emacs 27 Philipp Stephani
     [not found] ` <mailman.2226.1583586546.2412.bug-gnu-emacs@gnu.org>
2020-03-08 11:33   ` Alan Mackenzie
2020-05-20 19:13     ` Alan Mackenzie
2020-05-21 15:56       ` Philipp Stephani
2020-05-21 16:15         ` Eli Zaretskii
2020-05-21 17:24           ` Philipp Stephani
2020-05-21 17:26             ` Philipp Stephani
2020-05-21 19:15             ` Eli Zaretskii
2020-05-21 17:42           ` Alan Mackenzie
2020-05-21 19:14             ` Eli Zaretskii
2020-05-21 20:19               ` Alan Mackenzie [this message]
2020-05-22  5:58                 ` Eli Zaretskii
2020-05-22  9:58                   ` Alan Mackenzie
2020-05-23 19:12                     ` Philipp Stephani
2020-04-19 14:03 ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200521201935.GB12036@ACM \
    --to=acm@muc.de \
    --cc=39972@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=p.stephani2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.