comparison lispref/keymaps.texi @ 40646:6123edb0c45e

Explain why a parent for a non-sparse keymap is not useful.
author Richard M. Stallman <rms@gnu.org>
date Fri, 02 Nov 2001 07:11:18 +0000
parents 30c76f38ad7b
children 943603fc2ef2
comparison
equal deleted inserted replaced
40645:d514b33721f2 40646:6123edb0c45e
331 If @var{keymap} has submaps (bindings for prefix keys), they too receive 331 If @var{keymap} has submaps (bindings for prefix keys), they too receive
332 new parent keymaps that reflect what @var{parent} specifies for those 332 new parent keymaps that reflect what @var{parent} specifies for those
333 prefix keys. 333 prefix keys.
334 @end defun 334 @end defun
335 335
336 Here is an example showing how to make a keymap that inherits 336 Here is an example showing how to make a keymap that inherits
337 from @code{text-mode-map}: 337 from @code{text-mode-map}:
338 338
339 @example 339 @example
340 (let ((map (make-sparse-keymap))) 340 (let ((map (make-sparse-keymap)))
341 (set-keymap-parent map text-mode-map) 341 (set-keymap-parent map text-mode-map)
342 map) 342 map)
343 @end example 343 @end example
344
345 A non-sparse keymap can have a parent too, but this is not very
346 useful. A non-sparse keymap always specifies something as the binding
347 for every numeric character code without modifier bits, even if it is
348 @code{nil}, so these character's bindings are never inherited from
349 the parent keymap.
344 350
345 @node Prefix Keys 351 @node Prefix Keys
346 @section Prefix Keys 352 @section Prefix Keys
347 @cindex prefix key 353 @cindex prefix key
348 354