# HG changeset patch # User Richard M. Stallman # Date 1043523916 0 # Node ID fea7066c9e82b0e088733691116abcbece0a8d2f # Parent 3f0a84732a62b10b960f093aff9a49d6fb68f648 Document that a symbol can act as a keymap. diff -r 3f0a84732a62 -r fea7066c9e82 lispref/keymaps.texi --- a/lispref/keymaps.texi Sat Jan 25 19:44:24 2003 +0000 +++ b/lispref/keymaps.texi Sat Jan 25 19:45:16 2003 +0000 @@ -103,8 +103,9 @@ A keymap is a list whose @sc{car} is the symbol @code{keymap}. The remaining elements of the list define the key bindings of the keymap. -Use the function @code{keymapp} (see below) to test whether an object is -a keymap. +A symbol whose function definition is a keymap is also a keymap. Use +the function @code{keymapp} (see below) to test whether an object is a +keymap. Several kinds of elements may appear in a keymap, after the symbol @code{keymap} that begins it: @@ -202,7 +203,8 @@ @defun keymapp object This function returns @code{t} if @var{object} is a keymap, @code{nil} otherwise. More precisely, this function tests for a list whose -@sc{car} is @code{keymap}. +@sc{car} is @code{keymap}, or for a symbol whose function definition +satisfies @code{keymapp}. @example @group @@ -210,6 +212,11 @@ @result{} t @end group @group +(fset 'foo '(keymap)) +(keymapp 'foo) + @result{} t +@end group +@group (keymapp (current-global-map)) @result{} t @end group