From unknown Fri Jun 20 18:15:03 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#23175 <23175@debbugs.gnu.org> To: bug#23175 <23175@debbugs.gnu.org> Subject: Status: CC Mode 5.33 (C++/l); `c-mode-base-map' has no parent keymap Reply-To: bug#23175 <23175@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:15:03 +0000 retitle 23175 CC Mode 5.33 (C++/l); `c-mode-base-map' has no parent keymap reassign 23175 emacs,cc-mode submitter 23175 glaysher@umich.edu severity 23175 wishlist tag 23175 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 17:21:01 2016 Received: (at submit) by debbugs.gnu.org; 31 Mar 2016 21:21:01 +0000 Received: from localhost ([127.0.0.1]:46519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1alk1V-0002df-EY for submit@debbugs.gnu.org; Thu, 31 Mar 2016 17:21:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1alVWB-0004CI-RD for submit@debbugs.gnu.org; Thu, 31 Mar 2016 01:51:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alVW5-0000pN-U9 for submit@debbugs.gnu.org; Thu, 31 Mar 2016 01:51:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alVW5-0000pJ-Qj for submit@debbugs.gnu.org; Thu, 31 Mar 2016 01:51:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alVW4-0001hj-QT for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2016 01:51:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alVW3-0000ob-OO for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2016 01:51:36 -0400 Received: from mail-ig0-x22a.google.com ([2607:f8b0:4001:c05::22a]:32909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alVW3-0000oV-JC for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2016 01:51:35 -0400 Received: by mail-ig0-x22a.google.com with SMTP id ma7so84966252igc.0 for ; Wed, 30 Mar 2016 22:51:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:from:date:message-id:subject:to; bh=aZgVOPt7OZIWq+k4i14wKUGvIKdcoehHo0VA5b2LDS8=; b=Ap9qh6xxfGO69PcPFz7YRA038mvaESEcGdZKfNHTcbK7lSdROmACN+FycYu/nL+Ooz bBsomi3vH2oAPGLRU8kJzgvv78NGdT3Gx/fGul4zR/IPB6ofHdfXu1oEF8OidY9gPCsj yygovn4fCkuHB+sXP8eCGAn36WpW7PcFnYxfGGL3CbyJFBNQphCPdlKvMPZV+TNF3LQA vlRPPwvrsv0tCZYQFBy8Q/J3nKa/0zh0T4U7lzukiESq4msnG2TXjhx1FlXlc5Hqnsiv 6r7wMs0L3ILMjBuFDjmysuPHtg5WNwaab60jDFOKunBTRmF3MRV03PGHRZgFGHC39QKv XkBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=aZgVOPt7OZIWq+k4i14wKUGvIKdcoehHo0VA5b2LDS8=; b=a0a8Jj+as0zf2FKQywsOgS0z4Ar+MRxEivrMkwEwL89H094EkNwTUhDLexWkjGBkyP nG/fYZCvf1NcMSAnzTW0jfZBz+WJe43zC7XnWtS1ZOW9tZ1qz+KKHYNR5I0YpkbZ3ns3 5yVoqoUhucmWXmVU5mI9hrxBT1lLwddkOjIfWDp6mtF+U6pNtlCDiIaG740+Nure7ZT7 ApAyKOyvnOBlwdlFC1oqkHym8xsdByTSf55VFXJS4q6xkELWjfB82QEe8KchQJhUcEd2 s2DsmtqYHFwtGUzEx4bY3TH6gSFmsmto0AExRu7AGs4SLdRL5NKj1NKqKuJN/rpTIZU8 qvqg== X-Gm-Message-State: AD7BkJJ4JfvYf2M/AvdQcRdAJ2dY3MqiRl5TWZXMgLMfQez4/jKMb94TKRnK12zMynYav5ULO7y5S2ZEd4CLEQ== X-Received: by 10.50.64.146 with SMTP id o18mr13122087igs.51.1459403494558; Wed, 30 Mar 2016 22:51:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.0.142 with HTTP; Wed, 30 Mar 2016 22:51:15 -0700 (PDT) From: Elliot Glaysher Date: Wed, 30 Mar 2016 22:51:15 -0700 Message-ID: Subject: CC Mode 5.33 (C++/l); `c-mode-base-map' has no parent keymap To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 31 Mar 2016 17:21:01 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: glaysher@umich.edu Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) While all the modes defined in cc-mode.el derive from `prog-mode', their keymaps do not derive from `prog-mode-map'. Their definitions do not trigger the call to `set-keymap-parent' that `define-derived-mode' usually does automatically. This can be fixed by adding a call to set-keymap-parent right after c-mode-base-map gets set to a sparse map, but a more complicated fix is probably needed if you care about xemacs compatibility (and `c-make-inherited-keymap' implies that you do). See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14504 for another case where this happened in `emacs-lisp-mode'. Emacs : GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.16.7) of 2016-03-24 Package: CC Mode 5.33 (C++/l) Buffer Style: google c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-string-delim gen-comment-delim syntax-properties 1-bit) -- -- Elliot From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 08 07:19:28 2016 Received: (at 23175) by debbugs.gnu.org; 8 Jun 2016 11:19:28 +0000 Received: from localhost ([127.0.0.1]:59852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAbWC-0002mY-5k for submit@debbugs.gnu.org; Wed, 08 Jun 2016 07:19:28 -0400 Received: from mail.muc.de ([193.149.48.3]:16797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAbWA-0002mQ-FB for 23175@debbugs.gnu.org; Wed, 08 Jun 2016 07:19:27 -0400 Received: (qmail 99427 invoked by uid 3782); 8 Jun 2016 11:19:25 -0000 Date: 8 Jun 2016 11:19:25 -0000 Message-ID: <20160608111925.99426.qmail@mail.muc.de> From: Alan Mackenzie To: glaysher@umich.edu Subject: Re: bug#23175: CC Mode 5.33 (C++/l); `c-mode-base-map' has no parent keymap Organization: muc.de e.V. In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.3.1-20141224 ("Tallant") (UNIX) (FreeBSD/10.3-RELEASE (amd64)) X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 23175 Cc: 23175@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Hello, Elliot. In article you wrote: > While all the modes defined in cc-mode.el derive from `prog-mode', their > keymaps do not derive from `prog-mode-map'. Their definitions do not > trigger the call to `set-keymap-parent' that `define-derived-mode' > usually does automatically. As you know, the structure of the CC Mode keymaps is one map per mode (each of which has a small number of bindings) and c-mode-base-map (containing the bulk of the modes' bindings) which is the parent of the other ones. > This can be fixed by adding a call to set-keymap-parent right after > c-mode-base-map gets set to a sparse map, ..... I'm not convinced this is true. This make-sparse-keymap call for c-mode-base-map happens at the top level of cc-mode.el, and it's not clear that prog-mode.elc has been loaded yet. I suppose we could insert a (require 'prog-mode), but that's untidy and might have other issues. > ..... but a more complicated fix is probably needed if you care about > xemacs compatibility (and `c-make-inherited-keymap' implies that you > do). I most certainly do care about XEmacs! There's a slow process underway (slow, largely because of me dragging my feet) where define-derived-mode is gradually acquiring features which make it easier for CC Mode's mode commands to adapt to, without loss of functionality. Originally, define-derived-mode was a bit of a straightjacket in what it allowed major modes to do, and CC Mode's mode commands (which are very old indeed, over 20 years old) didn't fit well into this. In Emacs 25.2, there will be a further fix, whereby the major mode hooks don't get called twice, but you probably know that already. > See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14504 for another case > where this happened in `emacs-lisp-mode'. Another way of looking at this is that there's currently nothing in prog-mode-map that CC Mode can use; prog-indent-sexp wouldn't work properly in CC Mode's modes even if its keybinding wasn't shadowed by a CC Mode command. So, I think I'd rather leave this change until there's something compelling in prog-mode-map. For now, I'm going to mark the bug as "won't fix". But, all the same, thank you for the bug report! > Emacs : GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.16.7) > of 2016-03-24 > Package: CC Mode 5.33 (C++/l) > Buffer Style: google > c-emacs-features: (pps-extended-state col-0-paren posix-char-classes > gen-string-delim gen-comment-delim syntax-properties 1-bit) > -- > -- Elliot -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 08 07:27:02 2016 Received: (at control) by debbugs.gnu.org; 8 Jun 2016 11:27:02 +0000 Received: from localhost ([127.0.0.1]:59857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAbdV-0002xD-Vz for submit@debbugs.gnu.org; Wed, 08 Jun 2016 07:27:02 -0400 Received: from mail.muc.de ([193.149.48.3]:49089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAbdU-0002x1-DC for control@debbugs.gnu.org; Wed, 08 Jun 2016 07:27:00 -0400 Received: (qmail 683 invoked by uid 3782); 8 Jun 2016 11:26:59 -0000 Date: 8 Jun 2016 11:26:59 -0000 Message-ID: <20160608112659.682.qmail@mail.muc.de> From: Alan Mackenzie To: control@debbugs.gnu.org Subject: Re: bug#23175: CC Mode 5.33 (C++/l); `c-mode-base-map' has no parent keymap Organization: muc.de e.V. In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.3.1-20141224 ("Tallant") (UNIX) (FreeBSD/10.3-RELEASE (amd64)) X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) tags 23175 + wontfix (At least, won't fix _yet_. There may well come strong reasons to fix it in the future.) -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 25 15:00:36 2017 Received: (at control) by debbugs.gnu.org; 25 Apr 2017 19:00:36 +0000 Received: from localhost ([127.0.0.1]:40059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d35hU-0007l9-8q for submit@debbugs.gnu.org; Tue, 25 Apr 2017 15:00:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d35hT-0007ku-8C for control@debbugs.gnu.org; Tue, 25 Apr 2017 15:00:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d35hN-0000P8-H7 for control@debbugs.gnu.org; Tue, 25 Apr 2017 15:00:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d35hN-0000P4-EH for control@debbugs.gnu.org; Tue, 25 Apr 2017 15:00:29 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1d35hN-0007eD-3A for control@debbugs.gnu.org; Tue, 25 Apr 2017 15:00:29 -0400 Subject: control message for bug 26658 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Tue, 25 Apr 2017 15:00:29 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) merge 23175 26658 From debbugs-submit-bounces@debbugs.gnu.org Wed May 03 23:50:37 2017 Received: (at control) by debbugs.gnu.org; 4 May 2017 03:50:37 +0000 Received: from localhost ([127.0.0.1]:53432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d67mm-0005sq-P0 for submit@debbugs.gnu.org; Wed, 03 May 2017 23:50:36 -0400 Received: from mail-it0-f50.google.com ([209.85.214.50]:37355) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d67mk-0005sb-9p for control@debbugs.gnu.org; Wed, 03 May 2017 23:50:35 -0400 Received: by mail-it0-f50.google.com with SMTP id x188so1761651itb.0 for ; Wed, 03 May 2017 20:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=4KhQUmHuKTmw37zKh77oZK7fnZoiIfPWG89k2j3A2w8=; b=uU5LTlvVKi+5x4+vU7hamVJZd9VuX/qA7h+BY7BfPdVTG3nB8byUc5qOuQwzmb95GE k1AfgpcHzfhTUvxFE+b5SOuxbwmW/TzPWk1TQDskkBtJ5iQWtiXFOVJJxKB7bVr9mx02 8nGwTotpVEFAC+fxBVgeCaOVtyiP4pejU7hLRFXLcvO2wOFzVuktOO/vOOpk4/OmYZzj VrJU3lW92L4SElBGOR4o0DuITpVTOHMXQAT9LZUrkaruFfEJ8K7mXCtFtzReWpm16qTv /LAOQ1zP3AdlvlhIMdlMOaPPZoQuqd20/UVexI5Sj/vckISPLCqDdaI96lu7EMDT5WFN e5vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=4KhQUmHuKTmw37zKh77oZK7fnZoiIfPWG89k2j3A2w8=; b=l91lPz3y2eBasmqCMljlmJLyQ6kPDHdGaw1CsHwc6Ex9wrDOzepYH3+yfynEuJ+LM+ iKYSDpSKfHH7zxC18ZSn70DNbx+AORP9/WUtg7N1f9beudqSZsbRYrmDXew1kYWw0IwV mOrAWp6rEdA+Da6YfcqXfPDG2In1lwiWub1+puOHu2gIwAb/I0Iw/qDEg2sIW491+Nzh 7NSfWG/1L0qdln+5RIYVTG9U8X7JJHIYNETfI1yuoS4sXmcZTlHSHV+NB3EKiluZbMY6 XBCi+nT4tQ0wHN1uhdJL1CGdOr1oKwJnRirFFIVs9kldR+fxYLfKYj13BwvdtEy1H7V2 MJsQ== X-Gm-Message-State: AN3rC/6Nd0MyLl4mE0oEqIeMowmdaTF1AYb+WbqKHGOhuSqLEet/3IvG jaKGhOAo1I9t+zUR X-Received: by 10.36.155.194 with SMTP id o185mr11953110itd.64.1493869828469; Wed, 03 May 2017 20:50:28 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id k72sm10206998iok.52.2017.05.03.20.50.27 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 May 2017 20:50:27 -0700 (PDT) From: npostavs@users.sourceforge.net To: control@debbugs.gnu.org Subject: Re: bug#26658: 25.2; cc-mode doesn't use prog-mode-map as parent for c-mode-base-map References: <2136449839.36363.1493146365820@office.mailbox.org> <20170427193636.GA2683@acm> Date: Wed, 03 May 2017 23:52:00 -0400 In-Reply-To: <20170427193636.GA2683@acm> (Alan Mackenzie's message of "Thu, 27 Apr 2017 19:36:36 +0000") Message-ID: <87wp9xmg7z.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) severity 26658 wishlist tags 26658 = patch quit Alan Mackenzie writes: > I've been trying to think of good reasons not to do this (on the CC Mode > within Emacs), and haven't been able to come up with any yet. ;-) > > I think it's more likely that as define-derived-mode and prog-mode > gradually congealed into existence, prog-mode-map got left out of > c-mode-base-map, sort of forgotten. > > So yes, this change would surely be a good idea, given that this CC Mode > is derived from prog-mode anyway. Vasilij Schneidermann writes: > I've ensured the bug is present and wrote a patch that fixes the issue. From unknown Fri Jun 20 18:15:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 10 Aug 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator