GNU bug report logs - #14797
24.3.50; new, undocumented menu structure using VECTORS?

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Thu, 4 Jul 2013 23:55:02 UTC

Severity: minor

Tags: fixed, patch

Found in version 24.3.50

Fixed in version 25.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #23 received at 14797 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 14797 <at> debbugs.gnu.org
Subject: Re: bug#14797: 24.3.50;
 new, undocumented menu structure using VECTORS?
Date: Sat, 06 Aug 2016 09:09:50 -0400
[Message part 1 (text/plain, inline)]
tags 14797 patch
quit

Drew Adams <drew.adams <at> oracle.com> writes:

> What was gained by this?

I guess it's for efficiency?

Anyway, it might as well be documented, how about this:

[v1-0001-Document-use-of-vectors-in-keymaps.patch (text/plain, inline)]
From 6dd01ff617b3ee8ef8ad307a7776c2142f7f02ed Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> gmail.com>
Date: Sat, 6 Aug 2016 09:05:05 -0400
Subject: [PATCH v1] Document use of vectors in keymaps

* doc/lispref/keymaps.texi (Format of Keymaps): Mention vector
format (Bug #14797).
---
 doc/lispref/keymaps.texi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index f5d3811..a47d790 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -199,6 +199,14 @@ Format of Keymaps
 bindings.  A keymap with such a char-table is called a @dfn{full
 keymap}.  Other keymaps are called @dfn{sparse keymaps}.
 
+@item @var{vector}
+This kind of element is similar to a char-table: element @var{n} is
+the binding for the character with code @var{n}.  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
 @cindex overall prompt string
-- 
2.8.0


This bug report was last modified 8 years and 288 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.