unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Redefine the `special-mode-map'
@ 2015-01-09  4:26 Alexander Shukaev
  2015-01-09 14:46 ` Alex Kost
  0 siblings, 1 reply; 11+ messages in thread
From: Alexander Shukaev @ 2015-01-09  4:26 UTC (permalink / raw)
  To: help-gnu-emacs

Hello everyone,

I'd like to redefine the `special-mode-map'. Accordingly, in the very
beginning of my Emacs configuration I've added the following code:

    (let ((keymap (make-sparse-keymap)))
      (suppress-keymap keymap)
      (define-key keymap (kbd "q") #'quit-window)
      (define-key keymap (kbd "r") #'revert-buffer)
      (setq special-mode-map keymap))

I assume that all the modes which are either derived from `special-mode' or
have `special-mode-map' as a parent to their respective maps should indeed
inherit the above key bindings.

However, this is not the case. [C-h][b] shows that the above code had no
effect and that the default value of `special-mode-map' was still used as a
parent to construct child maps. In contrast, to complicate things,
[C-h][v]special-mode-map shows that `special-mode-map' contains all the
above changes. So what is going on? How to solve this problem?

Thanks and regards,
Alexander


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-01-09 19:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-09  4:26 Redefine the `special-mode-map' Alexander Shukaev
2015-01-09 14:46 ` Alex Kost
2015-01-09 14:53   ` Alexander Shukaev
2015-01-09 15:02     ` Alexander Shukaev
2015-01-09 15:05     ` Dmitry Gutov
2015-01-09 15:09       ` Alexander Shukaev
2015-01-09 18:48         ` Michael Heerdegen
2015-01-09 18:54           ` Alexander Shukaev
2015-01-09 18:58             ` Dmitry Gutov
2015-01-09 19:22               ` Alexander Shukaev
2015-01-09 19:29             ` Michael Heerdegen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).