emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 3c9cb57: Document use of vectors in keymaps


From: Noam Postavsky
Subject: [Emacs-diffs] emacs-25 3c9cb57: Document use of vectors in keymaps
Date: Sat, 6 Aug 2016 19:46:32 +0000 (UTC)

branch: emacs-25
commit 3c9cb57c6fae57d3798298faecccd0402b4ddd9a
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Document use of vectors in keymaps
    
    * doc/lispref/keymaps.texi (Format of Keymaps): Mention vector
    format (Bug #14797).
---
 doc/lispref/keymaps.texi |   17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index f5d3811..2641ad0 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -194,10 +194,19 @@ explicitly bound to @code{nil} (see below).
 @item @var{char-table}
 If an element of a keymap is a char-table, it counts as holding
 bindings for all character events with no modifier bits
-(@pxref{modifier bits}): element @var{n} is the binding for the
-character with code @var{n}.  This is a compact way to record lots of
-bindings.  A keymap with such a char-table is called a @dfn{full
-keymap}.  Other keymaps are called @dfn{sparse keymaps}.
+(@pxref{modifier bits}): the element whose index is @var{c} is the
+binding for the character @var{c}.  This is a compact way to record
+lots of bindings.  A keymap with such a char-table is called a
address@hidden keymap}.  Other keymaps are called @dfn{sparse keymaps}.
+
address@hidden @var{vector}
+This kind of element is similar to a char-table: the element whose
+index is @var{c} is the binding for the character @var{c}.  Since the
+range of characters that can be bound this way is limited by the
+vector size, and vector creation allocates space for all character
+codes from 0 up, this format should not be used except for creating
+menu keymaps (@pxref{Menu Keymaps}), where the bindings themselves
+don't matter.
 
 @item @var{string}
 @cindex keymap prompt string



reply via email to

[Prev in Thread] Current Thread [Next in Thread]