From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Error in C++ mode with Emacs 27.0.90 Date: Mon, 30 Mar 2020 21:36:14 +0300 Message-ID: <83h7y53d29.fsf@gnu.org> References: <1385091004.1458082.1585083014184@mail1.libero.it> <2124649786.1598258.1585324562989@mail1.libero.it> <20200328151944.GF7449@ACM> <56971920.1649844.1585416890173@mail1.libero.it> <20200328201057.GH7449@ACM> <1222531008.1631683.1585434664266@mail1.libero.it> <20200329115826.GB5469@ACM> <83ftdr5kpb.fsf@gnu.org> <20200330174938.GA6909@ACM> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="68768"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dgutov@yandex.ru, angelo.g0@libero.it, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 30 20:36:53 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jIzHJ-000HoW-7s for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Mar 2020 20:36:53 +0200 Original-Received: from localhost ([::1]:54870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIzHI-0002IZ-9D for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Mar 2020 14:36:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46468) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIzGa-0001ZO-Rx for emacs-devel@gnu.org; Mon, 30 Mar 2020 14:36:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jIzGY-0004hf-TK; Mon, 30 Mar 2020 14:36:07 -0400 Original-Received: from [176.228.60.248] (port=4980 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jIzGX-0002a6-Vf; Mon, 30 Mar 2020 14:36:06 -0400 In-Reply-To: <20200330174938.GA6909@ACM> (message from Alan Mackenzie on Mon, 30 Mar 2020 17:49:38 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246052 Archived-At: > Date: Mon, 30 Mar 2020 17:49:38 +0000 > Cc: angelo.g0@libero.it, emacs-devel@gnu.org, Dmitry Gutov > From: Alan Mackenzie > > diff --git a/lisp/imenu.el b/lisp/imenu.el > index fb8b3de662..1949f2f48f 100644 > --- a/lisp/imenu.el > +++ b/lisp/imenu.el > @@ -911,11 +911,15 @@ imenu-update-menubar > (setq index-alist (imenu--split-submenus index-alist)) > (let* ((menu (imenu--split-menu index-alist > (buffer-name))) > - (menu1 (imenu--create-keymap (car menu) > - (cdr (if (< 1 (length (cdr menu))) > - menu > - (car (cdr menu)))) > - 'imenu--menubar-select))) > + (menu1 (imenu--create-keymap > + (car menu) > + (cdr (if (or (< 1 (length (cdr menu))) > + ;; Have we a non-nested single entry? > + (atom (cdadr menu)) > + (atom (cadadr menu))) > + menu > + (car (cdr menu)))) > + 'imenu--menubar-select))) > (setcdr imenu--menubar-keymap (cdr menu1))))))) > > (defun imenu--menubar-select (item) > > > Should I commit this to the emacs-27 release branch? Yes, please.