GNU bug report logs - #23175
CC Mode 5.33 (C++/l); `c-mode-base-map' has no parent keymap

Previous Next

Packages: emacs, cc-mode;

Reported by: glaysher <at> umich.edu

Date: Thu, 31 Mar 2016 21:21:03 UTC

Severity: wishlist

Tags: patch

Merged with 26658

Found in version 25.2

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

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Elliot Glaysher <eglaysher <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: CC Mode 5.33 (C++/l); `c-mode-base-map' has no parent keymap
Date: Wed, 30 Mar 2016 22:51:15 -0700
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




This bug report was last modified 7 years and 316 days ago.

Previous Next


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