aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Möllmann2022-10-20 14:38:21 +0200
committerGerd Möllmann2022-10-20 14:38:21 +0200
commit62582ea927aee0212ef08702d07880e86f64c442 (patch)
tree52478c830f37541528612aa8d717527bc9317f6b
parent51cd0e05d64bf5d8142036af6e697cec67c859c0 (diff)
downloademacs-62582ea927aee0212ef08702d07880e86f64c442.tar.gz
emacs-62582ea927aee0212ef08702d07880e86f64c442.zip
Fix completion for new symbol table layout
-rw-r--r--src/minibuf.c34
1 files changed, 26 insertions, 8 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index 886d2dec936..36b8d401d92 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1658,6 +1658,12 @@ or from one of the possible completions. */)
1658 idx++; 1658 idx++;
1659 if (idx >= HASH_TABLE_SIZE (XHASH_TABLE (collection))) 1659 if (idx >= HASH_TABLE_SIZE (XHASH_TABLE (collection)))
1660 break; 1660 break;
1661 else if (symbol_table_p)
1662 {
1663 elt = HASH_KEY (XHASH_TABLE (collection), idx);
1664 eltstring = SYMBOL_NAME (elt);
1665 ++idx;
1666 }
1661 else 1667 else
1662 elt = eltstring = HASH_KEY (XHASH_TABLE (collection), idx++); 1668 elt = eltstring = HASH_KEY (XHASH_TABLE (collection), idx++);
1663 } 1669 }
@@ -1697,11 +1703,13 @@ or from one of the possible completions. */)
1697 tem = Fcommandp (elt, Qnil); 1703 tem = Fcommandp (elt, Qnil);
1698 else if (HASH_TABLE_P (collection)) 1704 else if (HASH_TABLE_P (collection))
1699 { 1705 {
1700 const Lisp_Object value = HASH_VALUE (XHASH_TABLE (collection), idx - 1);
1701 if (symbol_table_p) 1706 if (symbol_table_p)
1702 tem = call1 (predicate, value); 1707 tem = call1 (predicate, elt);
1703 else 1708 else
1704 tem = call2 (predicate, elt, value); 1709 {
1710 const Lisp_Object value = HASH_VALUE (XHASH_TABLE (collection), idx - 1);
1711 tem = call2 (predicate, elt, value);
1712 }
1705 } 1713 }
1706 else 1714 else
1707 tem = call1 (predicate, elt); 1715 tem = call1 (predicate, elt);
@@ -1893,6 +1901,11 @@ with a space are ignored unless STRING itself starts with a space. */)
1893 idx++; 1901 idx++;
1894 if (idx >= HASH_TABLE_SIZE (XHASH_TABLE (collection))) 1902 if (idx >= HASH_TABLE_SIZE (XHASH_TABLE (collection)))
1895 break; 1903 break;
1904 else if (symbol_table_p)
1905 {
1906 elt = HASH_KEY (XHASH_TABLE (collection), idx++);
1907 eltstring = SYMBOL_NAME (elt);
1908 }
1896 else 1909 else
1897 elt = eltstring = HASH_KEY (XHASH_TABLE (collection), idx++); 1910 elt = eltstring = HASH_KEY (XHASH_TABLE (collection), idx++);
1898 } 1911 }
@@ -1931,11 +1944,13 @@ with a space are ignored unless STRING itself starts with a space. */)
1931 tem = Fcommandp (elt, Qnil); 1944 tem = Fcommandp (elt, Qnil);
1932 else if (HASH_TABLE_P (collection)) 1945 else if (HASH_TABLE_P (collection))
1933 { 1946 {
1934 const Lisp_Object value = HASH_VALUE (XHASH_TABLE (collection), idx - 1);
1935 if (symbol_table_p) 1947 if (symbol_table_p)
1936 tem = call1 (predicate, value); 1948 tem = call1 (predicate, elt);
1937 else 1949 else
1938 tem = call2 (predicate, elt, value); 1950 {
1951 const Lisp_Object value = HASH_VALUE (XHASH_TABLE (collection), idx - 1);
1952 tem = call2 (predicate, elt, value);
1953 }
1939 } 1954 }
1940 else 1955 else
1941 tem = call1 (predicate, elt); 1956 tem = call1 (predicate, elt);
@@ -2086,9 +2101,12 @@ the values STRING, PREDICATE and `lambda'. */)
2086 2101
2087 if (HASH_TABLE_P (collection)) 2102 if (HASH_TABLE_P (collection))
2088 { 2103 {
2089 const Lisp_Object value = HASH_VALUE (XHASH_TABLE (collection), i);
2090 if (symbol_table_p) 2104 if (symbol_table_p)
2091 return call1 (predicate, value); 2105 {
2106 Lisp_Object sym = HASH_KEY (XHASH_TABLE (collection), i);
2107 return call1 (predicate, sym);
2108 }
2109 const Lisp_Object value = HASH_VALUE (XHASH_TABLE (collection), i);
2092 return call2 (predicate, tem, value); 2110 return call2 (predicate, tem, value);
2093 } 2111 }
2094 2112