Mercurial > emacs
comparison src/keymap.c @ 2752:93eda5bbc4df
(Faccessible_keymaps): Use whatever size the vector has.
(Fwhere_is_internal): Likewise.
(describe_vector): Likewise.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Wed, 12 May 1993 21:58:16 +0000 |
| parents | b8911c8b9700 |
| children | ed10207955a4 |
comparison
equal
deleted
inserted
replaced
| 2751:f95808ad4b95 | 2752:93eda5bbc4df |
|---|---|
| 1022 if (XTYPE (elt) == Lisp_Vector) | 1022 if (XTYPE (elt) == Lisp_Vector) |
| 1023 { | 1023 { |
| 1024 register int i; | 1024 register int i; |
| 1025 | 1025 |
| 1026 /* Vector keymap. Scan all the elements. */ | 1026 /* Vector keymap. Scan all the elements. */ |
| 1027 for (i = 0; i < DENSE_TABLE_SIZE; i++) | 1027 for (i = 0; i < XVECTOR (elt)->size; i++) |
| 1028 { | 1028 { |
| 1029 register Lisp_Object tem; | 1029 register Lisp_Object tem; |
| 1030 register Lisp_Object cmd; | 1030 register Lisp_Object cmd; |
| 1031 | 1031 |
| 1032 cmd = get_keyelt (XVECTOR (elt)->contents[i]); | 1032 cmd = get_keyelt (XVECTOR (elt)->contents[i]); |
| 1415 i++; | 1415 i++; |
| 1416 | 1416 |
| 1417 /* If we've just finished scanning a vector, advance map | 1417 /* If we've just finished scanning a vector, advance map |
| 1418 to the next element, and reset i in anticipation of the | 1418 to the next element, and reset i in anticipation of the |
| 1419 next vector we may find. */ | 1419 next vector we may find. */ |
| 1420 if (i >= DENSE_TABLE_SIZE) | 1420 if (i >= XVECTOR (elt)->size) |
| 1421 { | 1421 { |
| 1422 map = XCONS (map)->cdr; | 1422 map = XCONS (map)->cdr; |
| 1423 i = 0; | 1423 i = 0; |
| 1424 } | 1424 } |
| 1425 } | 1425 } |
| 1894 GCPRO3 (elt_prefix, tem1, kludge); | 1894 GCPRO3 (elt_prefix, tem1, kludge); |
| 1895 | 1895 |
| 1896 if (partial) | 1896 if (partial) |
| 1897 suppress = intern ("suppress-keymap"); | 1897 suppress = intern ("suppress-keymap"); |
| 1898 | 1898 |
| 1899 for (i = 0; i < DENSE_TABLE_SIZE; i++) | 1899 for (i = 0; i < XVECTOR (vector)->size; i++) |
| 1900 { | 1900 { |
| 1901 QUIT; | 1901 QUIT; |
| 1902 tem1 = get_keyelt (XVECTOR (vector)->contents[i]); | 1902 tem1 = get_keyelt (XVECTOR (vector)->contents[i]); |
| 1903 | 1903 |
| 1904 if (NILP (tem1)) continue; | 1904 if (NILP (tem1)) continue; |
| 1939 /* THIS gets the string to describe the character DUMMY. */ | 1939 /* THIS gets the string to describe the character DUMMY. */ |
| 1940 this = Fsingle_key_description (dummy); | 1940 this = Fsingle_key_description (dummy); |
| 1941 insert1 (this); | 1941 insert1 (this); |
| 1942 | 1942 |
| 1943 /* Find all consecutive characters that have the same definition. */ | 1943 /* Find all consecutive characters that have the same definition. */ |
| 1944 while (i + 1 < DENSE_TABLE_SIZE | 1944 while (i + 1 < XVECTOR (vector)->size |
| 1945 && (tem2 = get_keyelt (XVECTOR (vector)->contents[i+1]), | 1945 && (tem2 = get_keyelt (XVECTOR (vector)->contents[i+1]), |
| 1946 EQ (tem2, tem1))) | 1946 EQ (tem2, tem1))) |
| 1947 i++; | 1947 i++; |
| 1948 | 1948 |
| 1949 /* If we have a range of more than one character, | 1949 /* If we have a range of more than one character, |
