aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-01-25 19:45:16 +0000
committerRichard M. Stallman2003-01-25 19:45:16 +0000
commitaa2ac20c576119690fb9ef9cd780610d7ee7a293 (patch)
tree36c2b507498b7053a55559dfc06417327bca2b8a
parent347a36bc5bd7d078c83da6a83397738f839c58b7 (diff)
downloademacs-aa2ac20c576119690fb9ef9cd780610d7ee7a293.tar.gz
emacs-aa2ac20c576119690fb9ef9cd780610d7ee7a293.zip
Document that a symbol can act as a keymap.
-rw-r--r--lispref/keymaps.texi13
1 files changed, 10 insertions, 3 deletions
diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi
index 5102800d15e..be231798c43 100644
--- a/lispref/keymaps.texi
+++ b/lispref/keymaps.texi
@@ -103,8 +103,9 @@ for details.
103 103
104 A keymap is a list whose @sc{car} is the symbol @code{keymap}. The 104 A keymap is a list whose @sc{car} is the symbol @code{keymap}. The
105remaining elements of the list define the key bindings of the keymap. 105remaining elements of the list define the key bindings of the keymap.
106Use the function @code{keymapp} (see below) to test whether an object is 106A symbol whose function definition is a keymap is also a keymap. Use
107a keymap. 107the function @code{keymapp} (see below) to test whether an object is a
108keymap.
108 109
109 Several kinds of elements may appear in a keymap, after the symbol 110 Several kinds of elements may appear in a keymap, after the symbol
110@code{keymap} that begins it: 111@code{keymap} that begins it:
@@ -202,7 +203,8 @@ lisp-mode-map
202@defun keymapp object 203@defun keymapp object
203This function returns @code{t} if @var{object} is a keymap, @code{nil} 204This function returns @code{t} if @var{object} is a keymap, @code{nil}
204otherwise. More precisely, this function tests for a list whose 205otherwise. More precisely, this function tests for a list whose
205@sc{car} is @code{keymap}. 206@sc{car} is @code{keymap}, or for a symbol whose function definition
207satisfies @code{keymapp}.
206 208
207@example 209@example
208@group 210@group
@@ -210,6 +212,11 @@ otherwise. More precisely, this function tests for a list whose
210 @result{} t 212 @result{} t
211@end group 213@end group
212@group 214@group
215(fset 'foo '(keymap))
216(keymapp 'foo)
217 @result{} t
218@end group
219@group
213(keymapp (current-global-map)) 220(keymapp (current-global-map))
214 @result{} t 221 @result{} t
215@end group 222@end group