changeset 14304:57194b6a555d

(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.
author Karl Heuer <kwzh@gnu.org>
date Wed, 24 Jan 1996 23:42:32 +0000
parents 48e3ee5005cd
children 3cc44eaf9ebf
files src/keymap.c
diffstat 1 files changed, 21 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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;
 	    }