aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1996-01-24 23:42:32 +0000
committerKarl Heuer1996-01-24 23:42:32 +0000
commitc3f270649dad15bad0413c7c484c8133acb03058 (patch)
treea801866b45cc051e10dba7e2c5207afd4ae63ae9 /src
parent2b1c9cfb20ac510c87dba2e903400e899772eb2d (diff)
downloademacs-c3f270649dad15bad0413c7c484c8133acb03058.tar.gz
emacs-c3f270649dad15bad0413c7c484c8133acb03058.zip
(Faccessible_keymaps): Doc fix.
(describe_command): Sometimes use col 32 for desc. Record that col in previous_description_column for hysteresis. (describe_map): Clear out previous_description_column.
Diffstat (limited to 'src')
-rw-r--r--src/keymap.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/keymap.c b/src/keymap.c
index ef534b5894f..bf3bf07418d 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1124,7 +1124,7 @@ DEFUN ("accessible-keymaps", Faccessible_keymaps, Saccessible_keymaps,
1124 "Find all keymaps accessible via prefix characters from KEYMAP.\n\ 1124 "Find all keymaps accessible via prefix characters from KEYMAP.\n\
1125Returns a list of elements of the form (KEYS . MAP), where the sequence\n\ 1125Returns a list of elements of the form (KEYS . MAP), where the sequence\n\
1126KEYS starting from KEYMAP gets you to MAP. These elements are ordered\n\ 1126KEYS starting from KEYMAP gets you to MAP. These elements are ordered\n\
1127so that the KEYS increase in length. The first element is (\"\" . KEYMAP).\n\ 1127so that the KEYS increase in length. The first element is ([] . KEYMAP).\n\
1128An optional argument PREFIX, if non-nil, should be a key sequence;\n\ 1128An optional argument PREFIX, if non-nil, should be a key sequence;\n\
1129then the value includes only maps for prefixes that start with PREFIX.") 1129then the value includes only maps for prefixes that start with PREFIX.")
1130 (keymap, prefix) 1130 (keymap, prefix)
@@ -2081,13 +2081,30 @@ key binding\n\
2081 UNGCPRO; 2081 UNGCPRO;
2082} 2082}
2083 2083
2084static int previous_description_column;
2085
2084static void 2086static void
2085describe_command (definition) 2087describe_command (definition)
2086 Lisp_Object definition; 2088 Lisp_Object definition;
2087{ 2089{
2088 register Lisp_Object tem1; 2090 register Lisp_Object tem1;
2091 int column = current_column ();
2092 int description_column;
2089 2093
2090 Findent_to (make_number (16), make_number (1)); 2094 /* If column 16 is no good, go to col 32;
2095 but don't push beyond that--go to next line instead. */
2096 if (column > 30)
2097 {
2098 insert_char ('\n');
2099 description_column = 32;
2100 }
2101 else if (column > 14 || (column > 10 && previous_description_column == 32))
2102 description_column = 32;
2103 else
2104 description_column = 16;
2105
2106 Findent_to (make_number (description_column), make_number (1));
2107 previous_description_column = description_column;
2091 2108
2092 if (SYMBOLP (definition)) 2109 if (SYMBOLP (definition))
2093 { 2110 {
@@ -2241,6 +2258,7 @@ describe_map (map, keys, elt_describer, partial, shadow, seen, nomenu)
2241 2258
2242 if (first) 2259 if (first)
2243 { 2260 {
2261 previous_description_column = 0;
2244 insert ("\n", 1); 2262 insert ("\n", 1);
2245 first = 0; 2263 first = 0;
2246 } 2264 }