GNU bug report logs - #26658
25.2; cc-mode doesn't use prog-mode-map as parent for c-mode-base-map

Previous Next

Packages: cc-mode, emacs;

Reported by: Vasilij Schneidermann <mail <at> vasilij.de>

Date: Tue, 25 Apr 2017 18:55:01 UTC

Severity: wishlist

Tags: patch

Merged with 23175

Found in version 25.2

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Vasilij Schneidermann <mail <at> vasilij.de>
Cc: 26658 <at> debbugs.gnu.org
Subject: bug#26658: 25.2; cc-mode doesn't use prog-mode-map as parent for c-mode-base-map
Date: Thu, 27 Apr 2017 19:36:36 +0000
Hello, Vasilij.

On Tue, Apr 25, 2017 at 20:52:45 +0200, Vasilij Schneidermann wrote:
> See title.  Modes derived from cc-mode inherit its keybindings, however
> they won't inherit keys defined in prog-mode-map.  This could probably
> be rectified by using (set-keymap-parent c-mode-base-map prog-mode-map)
> at the strategically correct location (like the lengthy top-level if
> form setting up that map).  Is there any reason to *not* have this
> change?  I'd otherwise write a patch for it.

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.

Do you want to write the patch?  If so, have you got copyright
assignments, or can you manage to write it as an "insignificant" (i.e.
very small) change?  I think the limit for insignificant changes is less
than 15 lines, but I'm not absolutely sure.  This wouldn't even need any
changes in the manual.  :-)

If you don't really want to write the patch, just say so, and I'll do
it.

Thanks for the bug report!

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 8 years and 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.