Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!cornell!uw-beaver!mit-eddie!bbn!gateway!PIZZA.BBN.COM!jr From: jr@PIZZA.BBN.COM (John Robinson) Newsgroups: comp.emacs Subject: Re: theory of keymaps (GNU emacs) Message-ID: <1449.586530657@pizza> Date: 2 Aug 88 13:10:57 GMT References: <62324@sun.uucp> Sender: news@bbn.COM Reply-To: jr@bbn.com Organization: BBN news/mail gateway Lines: 20 The following from the info node: File: emacs Node: Keymaps, Prev: Key Bindings, Up: Key Bindings, Next: Rebinding explains the crux of what you are after. See the node for a more complete description (^H i m emacs m keybindings m keymaps). A mode can also put a prefix definition of a global prefix character such as `C-x' into its local map. This is how major modes override the definitions of certain keys that start with `C-x'. This case is special, because the local definition does not entirely replace the global one. When both the global and local definitions of a key are other keymaps, the next character is looked up in both keymaps, with the local definition overriding the global one as usual. So, the character after the `C-x' is looked up in both the major mode's own keymap for redefined `C-x' commands and in `ctl-x-map'. If the major mode's own keymap for `C-x' commands contains `nil', the definition from the global keymap for `C-x' commands is used. /jr jr@bbn.com or bbn!jr