From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs 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 Message-ID: <20200521201935.GB12036@ACM> References: <20200308113302.43082.qmail@mail.muc.de> <20200520191303.GA19762@ACM> <835zcp5knl.fsf@gnu.org> <20200521174211.GA12036@ACM> <83367t5cdr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="119490"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39972@debbugs.gnu.org, p.stephani2@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 21 22:20:09 2020 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 1jbrfl-000V0K-6m for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 May 2020 22:20:09 +0200 Original-Received: from localhost ([::1]:39342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbrfk-00023E-90 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 May 2020 16:20:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbrfd-000233-U0 for bug-gnu-emacs@gnu.org; Thu, 21 May 2020 16:20:01 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbrfd-0004Bn-Kr for bug-gnu-emacs@gnu.org; Thu, 21 May 2020 16:20:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jbrfd-00068A-Gk for bug-gnu-emacs@gnu.org; Thu, 21 May 2020 16:20: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: Thu, 21 May 2020 20:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39972 X-GNU-PR-Package: emacs Original-Received: via spool by 39972-submit@debbugs.gnu.org id=B39972.159009238023534 (code B ref 39972); Thu, 21 May 2020 20:20:01 +0000 Original-Received: (at 39972) by debbugs.gnu.org; 21 May 2020 20:19:40 +0000 Original-Received: from localhost ([127.0.0.1]:57366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbrfI-00067V-KM for submit@debbugs.gnu.org; Thu, 21 May 2020 16:19:40 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:20913 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jbrfG-00067K-6B for 39972@debbugs.gnu.org; Thu, 21 May 2020 16:19:39 -0400 Original-Received: (qmail 97369 invoked by uid 3782); 21 May 2020 20:19:36 -0000 Original-Received: from acm.muc.de (p4fe15b01.dip0.t-ipconnect.de [79.225.91.1]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Thu, 21 May 2020 22:19:35 +0200 Original-Received: (qmail 22074 invoked by uid 1000); 21 May 2020 20:19:35 -0000 Content-Disposition: inline In-Reply-To: <83367t5cdr.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) 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" Xref: news.gmane.io gmane.emacs.bugs:180718 Archived-At: 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 , 39972@debbugs.gnu.org > > From: Alan Mackenzie > > > 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).