From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexander Shukaev Newsgroups: gmane.emacs.help Subject: Redefine the `special-mode-map' Date: Fri, 9 Jan 2015 05:26:41 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1420777626 31133 80.91.229.3 (9 Jan 2015 04:27:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 9 Jan 2015 04:27:06 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 09 05:27:01 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y9R9z-0006wE-SZ for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Jan 2015 05:26:56 +0100 Original-Received: from localhost ([::1]:49065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9R9z-0007Ba-2b for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Jan 2015 23:26:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9R9p-0007BP-3R for help-gnu-emacs@gnu.org; Thu, 08 Jan 2015 23:26:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9R9o-00021n-4H for help-gnu-emacs@gnu.org; Thu, 08 Jan 2015 23:26:44 -0500 Original-Received: from mail-la0-x230.google.com ([2a00:1450:4010:c03::230]:42577) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9R9n-00021j-SB for help-gnu-emacs@gnu.org; Thu, 08 Jan 2015 23:26:44 -0500 Original-Received: by mail-la0-f48.google.com with SMTP id gf13so12624166lab.7 for ; Thu, 08 Jan 2015 20:26:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=noAdThZpdJVViXJJBeluKJZ66aRPJ88rj8f/8H2qSPU=; b=AYPiK8TVrSLQK4vG6God82hfE3RaoevMP/79AWBHvHjem0pPXNkGGY6Mnbe8Dc0b7z hhfwkDaK+x092rICuKwxV8HmVts8NtmA/rZbrETnTjIC5vyIXK9UGuiAzGJqmve1SrzP uDlHOnGl/0XdhMgOvx4dLXnuVdyVOelQMml8kIg7Mg+sMF1GPU1DLFBvpzVuNFW0nAh6 CmyiBJs/hpW3FKg//q0/BI+IC+d3dLpOfwS0ADUn3lLskNXh39lXEkurwPAMCOHRs0OI 468sYWqAYO7Zgf/M1oO4mzAG9zI2sZq3S5RiMI5IFfVBSWghzgS2qd/icu3CnUVQD2rJ V+AQ== X-Received: by 10.112.135.99 with SMTP id pr3mr19318265lbb.61.1420777601995; Thu, 08 Jan 2015 20:26:41 -0800 (PST) Original-Received: by 10.112.123.235 with HTTP; Thu, 8 Jan 2015 20:26:41 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::230 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101956 Archived-At: 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