bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26658: 25.2; cc-mode doesn't use prog-mode-map as parent for c-mode-


From: Alan Mackenzie
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
User-agent: Mutt/1.7.2 (2016-11-26)

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).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]