[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pkg 62582ea927 72/76: Fix completion for new symbol table layout
From: |
Gerd Moellmann |
Subject: |
pkg 62582ea927 72/76: Fix completion for new symbol table layout |
Date: |
Fri, 21 Oct 2022 00:16:20 -0400 (EDT) |
branch: pkg
commit 62582ea927aee0212ef08702d07880e86f64c442
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
Fix completion for new symbol table layout
---
src/minibuf.c | 34 ++++++++++++++++++++++++++--------
1 file changed, 26 insertions(+), 8 deletions(-)
diff --git a/src/minibuf.c b/src/minibuf.c
index 886d2dec93..36b8d401d9 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1658,6 +1658,12 @@ or from one of the possible completions. */)
idx++;
if (idx >= HASH_TABLE_SIZE (XHASH_TABLE (collection)))
break;
+ else if (symbol_table_p)
+ {
+ elt = HASH_KEY (XHASH_TABLE (collection), idx);
+ eltstring = SYMBOL_NAME (elt);
+ ++idx;
+ }
else
elt = eltstring = HASH_KEY (XHASH_TABLE (collection), idx++);
}
@@ -1697,11 +1703,13 @@ or from one of the possible completions. */)
tem = Fcommandp (elt, Qnil);
else if (HASH_TABLE_P (collection))
{
- const Lisp_Object value = HASH_VALUE (XHASH_TABLE
(collection), idx - 1);
if (symbol_table_p)
- tem = call1 (predicate, value);
+ tem = call1 (predicate, elt);
else
- tem = call2 (predicate, elt, value);
+ {
+ const Lisp_Object value = HASH_VALUE (XHASH_TABLE
(collection), idx - 1);
+ tem = call2 (predicate, elt, value);
+ }
}
else
tem = call1 (predicate, elt);
@@ -1893,6 +1901,11 @@ with a space are ignored unless STRING itself starts
with a space. */)
idx++;
if (idx >= HASH_TABLE_SIZE (XHASH_TABLE (collection)))
break;
+ else if (symbol_table_p)
+ {
+ elt = HASH_KEY (XHASH_TABLE (collection), idx++);
+ eltstring = SYMBOL_NAME (elt);
+ }
else
elt = eltstring = HASH_KEY (XHASH_TABLE (collection), idx++);
}
@@ -1931,11 +1944,13 @@ with a space are ignored unless STRING itself starts
with a space. */)
tem = Fcommandp (elt, Qnil);
else if (HASH_TABLE_P (collection))
{
- const Lisp_Object value = HASH_VALUE (XHASH_TABLE
(collection), idx - 1);
if (symbol_table_p)
- tem = call1 (predicate, value);
+ tem = call1 (predicate, elt);
else
- tem = call2 (predicate, elt, value);
+ {
+ const Lisp_Object value = HASH_VALUE (XHASH_TABLE
(collection), idx - 1);
+ tem = call2 (predicate, elt, value);
+ }
}
else
tem = call1 (predicate, elt);
@@ -2086,9 +2101,12 @@ the values STRING, PREDICATE and `lambda'. */)
if (HASH_TABLE_P (collection))
{
- const Lisp_Object value = HASH_VALUE (XHASH_TABLE (collection), i);
if (symbol_table_p)
- return call1 (predicate, value);
+ {
+ Lisp_Object sym = HASH_KEY (XHASH_TABLE (collection), i);
+ return call1 (predicate, sym);
+ }
+ const Lisp_Object value = HASH_VALUE (XHASH_TABLE (collection), i);
return call2 (predicate, tem, value);
}
- pkg aa00af4e17 26/76: Consider shorthands out of scope, (continued)
- pkg aa00af4e17 26/76: Consider shorthands out of scope, Gerd Moellmann, 2022/10/21
- pkg 4c1bbd4fd7 31/76: intern-soft with ':' trick, Gerd Moellmann, 2022/10/21
- pkg ea65e35cf3 28/76: src/alloc.c: Remove all uses of `pure_alloc`, Gerd Moellmann, 2022/10/21
- pkg a5f6912c6d 30/76: Mapatoms differently, Gerd Moellmann, 2022/10/21
- pkg 2edc30628a 27/76: Use build_pure_c_string, Gerd Moellmann, 2022/10/21
- pkg 85c0eb1682 36/76: Merge remote-tracking branch 'origin/master' into pkg, Gerd Moellmann, 2022/10/21
- pkg 07f0b758ae 62/76: hash_remove_from_table returns bool, Gerd Moellmann, 2022/10/21
- pkg e1a730849e 42/76: Fix printing uninterned symbols, Gerd Moellmann, 2022/10/21
- pkg 1424d2c6b7 61/76: Fix intern-soft, Gerd Moellmann, 2022/10/21
- pkg bdca01dd38 29/76: Workaround for something Stefan missed, Gerd Moellmann, 2022/10/21
- pkg 62582ea927 72/76: Fix completion for new symbol table layout,
Gerd Moellmann <=
- pkg a93ec52542 76/76: Work on Lisp interface, Gerd Moellmann, 2022/10/21
- pkg 9ab00f542f 70/76: Introduce PACKAGE_NAMEX, Gerd Moellmann, 2022/10/21
- pkg 51cd0e05d6 71/76: De-duplicate packages for mapatoms, Gerd Moellmann, 2022/10/21
- pkg 9a263a0782 57/76: Move more package stuff to Lisp, Gerd Moellmann, 2022/10/21
- pkg d374cb202a 43/76: Revert "Use make-package instead of make-vector", Gerd Moellmann, 2022/10/21
- pkg 77543a203a 45/76: Revert "Dpn't assume symbol-name of keywords starts with colon", Gerd Moellmann, 2022/10/21
- pkg 0a345a1181 53/76: Make internals of Lisp_Package visible to Lisp, Gerd Moellmann, 2022/10/21
- pkg 13010d7bd0 47/76: Partially revert "Remove obarrays", Gerd Moellmann, 2022/10/21
- pkg 132f070747 58/76: New predefined hash table test for string-equal, Gerd Moellmann, 2022/10/21
- pkg 4f7c171fb4 49/76: Support specifying package size, Gerd Moellmann, 2022/10/21