Take a look at the definition of emacs-lisp-mode-map in lisp-modes.el :
(defvar emacs-lisp-mode-map (let ((map (make-sparse-keymap "Emacs-Lisp")) (menu-map (make-sparse-keymap "Emacs-Lisp")) (lint-map (make-sparse-keymap)) (prof-map (make-sparse-keymap)) (tracing-map (make-sparse-keymap))) (set-keymap-parent map lisp-mode-shared-map) … map))
The key is to call set-keymap-parent . Although Emacs Lisp mode is inherited from Prog mode, its layout is not inherited from prog-mode-map , but from another keyboard layout defined in lisp-modes.el :
(defvar lisp-mode-shared-map (let ((map (make-sparse-keymap))) (define-key map "\e\Cq" 'indent-sexp) (define-key map "\177" 'backward-delete-char-untabify) map) "Keymap for commands shared by all sorts of Lisp modes.")
This map also does not inherit from prog-mode-map , so the bindings in prog-mode-map really have no effect in Emacs Lisp Mode.
This may be a bug in Emacs.
Update: I wrote to the mailing list .
Update 2: Corresponding Error Report
Update 3: Bug fixed. In the current snapshot creation, your key bindings should work as expected. To work with earlier versions of Emacs, you can use the following snippet in init.el :
(unless (keymap-parent lisp-mode-shared-map) (set-keymap-parent lisp-mode-shared-map prog-mode-map))
Now lisp-mode-shared-map inherits from prog-mode-map , effectively replicating bug fixes.
source share