summaryrefslogtreecommitdiff
path: root/src/keymap.c
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1996-01-24 23:42:32 +0000
committerKarl Heuer <kwzh@gnu.org>1996-01-24 23:42:32 +0000
commit0fed42aec583a76243612a3386d6e8261c7cc761 (patch)
treea65c056a10e3a8b53dc7203bc7b033c3c13554bc /src/keymap.c
parent53144ac0573af9f819bf590137091489c636e72b (diff)
downloademacs-0fed42aec583a76243612a3386d6e8261c7cc761.tar.gz
(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/keymap.c')
-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,
"Find all keymaps accessible via prefix characters from KEYMAP.\n\
Returns a list of elements of the form (KEYS . MAP), where the sequence\n\
KEYS starting from KEYMAP gets you to MAP. These elements are ordered\n\
-so that the KEYS increase in length. The first element is (\"\" . KEYMAP).\n\
+so that the KEYS increase in length. The first element is ([] . KEYMAP).\n\
An optional argument PREFIX, if non-nil, should be a key sequence;\n\
then the value includes only maps for prefixes that start with PREFIX.")
(keymap, prefix)
@@ -2081,13 +2081,30 @@ key binding\n\
UNGCPRO;
}
+static int previous_description_column;
+
static void
describe_command (definition)
Lisp_Object definition;
{
register Lisp_Object tem1;
+ int column = current_column ();
+ int description_column;
- Findent_to (make_number (16), make_number (1));
+ /* If column 16 is no good, go to col 32;
+ but don't push beyond that--go to next line instead. */
+ if (column > 30)
+ {
+ insert_char ('\n');
+ description_column = 32;
+ }
+ else if (column > 14 || (column > 10 && previous_description_column == 32))
+ description_column = 32;
+ else
+ description_column = 16;
+
+ Findent_to (make_number (description_column), make_number (1));
+ previous_description_column = description_column;
if (SYMBOLP (definition))
{
@@ -2241,6 +2258,7 @@ describe_map (map, keys, elt_describer, partial, shadow, seen, nomenu)
if (first)
{
+ previous_description_column = 0;
insert ("\n", 1);
first = 0;
}