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.devel Subject: Re: Error in C++ mode with Emacs 27.0.90 Date: Mon, 30 Mar 2020 19:46:49 +0000 Message-ID: <20200330194649.GB6909@ACM> 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> <83h7y53d29.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="112950"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: dgutov@yandex.ru, angelo.g0@libero.it, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 30 21:47:50 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 1jJ0Nx-000THK-16 for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Mar 2020 21:47:49 +0200 Original-Received: from localhost ([::1]:55688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ0Nw-0000kz-40 for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Mar 2020 15:47:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58633) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ0N5-0000AI-1m for emacs-devel@gnu.org; Mon, 30 Mar 2020 15:46:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJ0N4-00066a-0u for emacs-devel@gnu.org; Mon, 30 Mar 2020 15:46:54 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:43219 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1jJ0N3-00062M-N6 for emacs-devel@gnu.org; Mon, 30 Mar 2020 15:46:53 -0400 Original-Received: (qmail 42193 invoked by uid 3782); 30 Mar 2020 19:46:51 -0000 Original-Received: from acm.muc.de (p4FE15DE1.dip0.t-ipconnect.de [79.225.93.225]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 30 Mar 2020 21:46:49 +0200 Original-Received: (qmail 6077 invoked by uid 1000); 30 Mar 2020 19:46:49 -0000 Content-Disposition: inline In-Reply-To: <83h7y53d29.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 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:246069 Archived-At: Hello, Eli. On Mon, Mar 30, 2020 at 21:36:14 +0300, Eli Zaretskii wrote: > > 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. Done. -- Alan Mackenzie (Nuremberg, Germany).