all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alexander Shukaev <haroogan@gmail.com>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Redefine the `special-mode-map'
Date: Fri, 9 Jan 2015 05:26:41 +0100	[thread overview]
Message-ID: <CAKu-7WxXDOUXDAOzDJh0H1BtQ7tXg7OG6Xxi_WdNTtSAKJHwRQ@mail.gmail.com> (raw)

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


             reply	other threads:[~2015-01-09  4:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-09  4:26 Alexander Shukaev [this message]
2015-01-09 14:46 ` Redefine the `special-mode-map' 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKu-7WxXDOUXDAOzDJh0H1BtQ7tXg7OG6Xxi_WdNTtSAKJHwRQ@mail.gmail.com \
    --to=haroogan@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.