@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1998, 1999, 2000
-@c Free Software Foundation, Inc.
+@c Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@setfilename ../info/keymaps
@node Keymaps, Modes, Command Loop, Top
@example
@group
lisp-mode-map
-@result{}
+@result{}
@end group
@group
-(keymap
+(keymap
;; @key{TAB}
- (9 . lisp-indent-line)
+ (9 . lisp-indent-line)
@end group
@group
;; @key{DEL}
- (127 . backward-delete-char-untabify)
+ (127 . backward-delete-char-untabify)
@end group
@group
- (3 keymap
+ (3 keymap
;; @kbd{C-c C-l}
- (12 . run-lisp))
+ (12 . run-lisp))
@end group
@group
- (27 keymap
+ (27 keymap
;; @r{@kbd{M-C-q}, treated as @kbd{@key{ESC} C-q}}
- (17 . indent-sexp)
+ (17 . indent-sexp)
;; @r{@kbd{M-C-x}, treated as @kbd{@key{ESC} C-x}}
- (24 . lisp-send-defun)))
+ (24 . lisp-send-defun)))
@end group
@end example
@end group
@group
;; @r{(This implements meta characters.)}
- (27 keymap
+ (27 keymap
(83 . center-paragraph)
(115 . center-line))
(9 . tab-to-tab-stop))
when the minor mode is enabled.
The variable @code{overriding-local-map}, if non-@code{nil}, specifies
-another local keymap that overrides the buffer's local map and all the
+another local keymap that overrides the buffer's local map and all the
minor mode keymaps.
All the active keymaps are used together to determine what command to
@example
@group
(current-global-map)
-@result{} (keymap [set-mark-command beginning-of-line @dots{}
+@result{} (keymap [set-mark-command beginning-of-line @dots{}
delete-backward-char])
@end group
@end example
@example
@group
(current-local-map)
-@result{} (keymap
- (10 . eval-print-last-sexp)
- (9 . lisp-indent-line)
- (127 . backward-delete-char-untabify)
+@result{} (keymap
+ (10 . eval-print-last-sexp)
+ (9 . lisp-indent-line)
+ (127 . backward-delete-char-untabify)
@end group
@group
- (27 keymap
- (24 . eval-defun)
+ (27 keymap
+ (24 . eval-defun)
(17 . indent-sexp)))
@end group
@end example
@end group
@group
(setq meta-prefix-char 24)
- @result{} 24
+ @result{} 24
@end group
@group
(key-binding "\M-b")
@end group
@group
map
-@result{} (keymap
+@result{} (keymap
(24 keymap ; @kbd{C-x}
(102 . forward-word)) ; @kbd{f}
(6 . forward-char)) ; @kbd{C-f}
;; @r{Bind @kbd{C-p} to the @code{ctl-x-map}.}
(define-key map "\C-p" ctl-x-map)
;; @code{ctl-x-map}
-@result{} [nil @dots{} find-file @dots{} backward-kill-sentence]
+@result{} [nil @dots{} find-file @dots{} backward-kill-sentence]
@end group
@group
map
@result{} (keymap ; @r{Note @code{foo} in @code{ctl-x-map}.}
(16 keymap [nil @dots{} foo @dots{} backward-kill-sentence])
- (24 keymap
+ (24 keymap
(102 . forward-word))
(6 . forward-char))
@end group
@smallexample
@group
-(substitute-key-definition
+(substitute-key-definition
'find-file 'find-file-read-only (current-global-map))
@end group
@end smallexample
@smallexample
@group
-(setq map '(keymap
- (?1 . olddef-1)
- (?2 . olddef-2)
+(setq map '(keymap
+ (?1 . olddef-1)
+ (?2 . olddef-2)
(?3 . olddef-1)))
@result{} (keymap (49 . olddef-1) (50 . olddef-2) (51 . olddef-1))
@end group
@code{negative-argument}. Otherwise it makes them undefined like the
rest of the printing characters.
-@cindex yank suppression
-@cindex @code{quoted-insert} suppression
+@cindex yank suppression
+@cindex @code{quoted-insert} suppression
The @code{suppress-keymap} function does not make it impossible to
modify a buffer, as it does not suppress commands such as @code{yank}
and @code{quoted-insert}. To prevent any modification of a buffer, make
@smallexample
@group
(accessible-keymaps (current-local-map))
-@result{}(("" keymap
+@result{}(("" keymap
(27 keymap ; @r{Note this keymap for @key{ESC} is repeated below.}
(83 . center-paragraph)
(115 . center-line))
@end group
@group
- ("^[" keymap
- (83 . center-paragraph)
+ ("^[" keymap
+ (83 . center-paragraph)
(115 . foo)))
@end group
@end smallexample
@smallexample
@group
(accessible-keymaps (current-global-map))
-@result{} (("" keymap [set-mark-command beginning-of-line @dots{}
+@result{} (("" keymap [set-mark-command beginning-of-line @dots{}
delete-backward-char])
@end group
@group
To define items in some local map, bind @code{`tool-bar-map} with
@code{let} around calls of this function:
@example
-(defvar foo-tool-bar-map
+(defvar foo-tool-bar-map
(let ((tool-bar-map (make-sparse-keymap)))
(tool-bar-add-item @dots{})
@dots{}