# HG changeset patch # User Karl Heuer # Date 822526952 0 # Node ID 57194b6a555dcc2ba18065d8a775244b935d7466 # Parent 48e3ee5005cd39ddbec7063610c3ba573eebd500 (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. diff -r 48e3ee5005cd -r 57194b6a555d src/keymap.c --- a/src/keymap.c Wed Jan 24 23:41:55 1996 +0000 +++ b/src/keymap.c Wed Jan 24 23:42:32 1996 +0000 @@ -1124,7 +1124,7 @@ "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 @@ UNGCPRO; } +static int previous_description_column; + static void describe_command (definition) Lisp_Object definition; { register Lisp_Object tem1; - - Findent_to (make_number (16), make_number (1)); + int column = current_column (); + int description_column; + + /* 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 @@ if (first) { + previous_description_column = 0; insert ("\n", 1); first = 0; }