emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108023: * keymap.c (describe_map_


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108023: * keymap.c (describe_map_tree): Revert 2011-07-07 change.
Date: Wed, 30 May 2012 22:08:58 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108023
fixes bug: http://debbugs.gnu.org/1169
committer: Chong Yidong <address@hidden>
branch nick: emacs-24
timestamp: Wed 2012-05-30 22:08:58 +0800
message:
  * keymap.c (describe_map_tree): Revert 2011-07-07 change.
  
  * doc.c (Fsubstitute_command_keys): Doc fix.
modified:
  src/ChangeLog
  src/doc.c
  src/keymap.c
  src/keymap.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-05-29 16:01:05 +0000
+++ b/src/ChangeLog     2012-05-30 14:08:58 +0000
@@ -1,3 +1,9 @@
+2012-05-30  Chong Yidong  <address@hidden>
+
+       * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
+
+       * doc.c (Fsubstitute_command_keys): Doc fix.
+
 2012-05-29  Eli Zaretskii  <address@hidden>
 
        * search.c (search_buffer): Remove calls to

=== modified file 'src/doc.c'
--- a/src/doc.c 2012-02-06 16:53:51 +0000
+++ b/src/doc.c 2012-05-30 14:08:58 +0000
@@ -698,18 +698,23 @@
 DEFUN ("substitute-command-keys", Fsubstitute_command_keys,
        Ssubstitute_command_keys, 1, 1, 0,
        doc: /* Substitute key descriptions for command names in STRING.
-Substrings of the form \\=\\[COMMAND] replaced by either: a keystroke
-sequence that will invoke COMMAND, or "M-x COMMAND" if COMMAND is not
-on any keys.
-Substrings of the form \\=\\{MAPVAR} are replaced by summaries
-\(made by `describe-bindings') of the value of MAPVAR, taken as a keymap.
-Substrings of the form \\=\\<MAPVAR> specify to use the value of MAPVAR
+Each substring of the form \\=\\[COMMAND] is replaced by either a
+keystroke sequence that invokes COMMAND, or "M-x COMMAND" if COMMAND
+is not on any keys.
+
+Each substring of the form \\=\\{MAPVAR} is replaced by a summary of
+the value of MAPVAR as a keymap.  This summary is similar to the one
+produced by `describe-bindings'.  The summary ends in two newlines
+\(used by the helper function `help-make-xrefs' to find the end of the
+summary).
+
+Each substring of the form \\=\\<MAPVAR> specifies the use of MAPVAR
 as the keymap for future \\=\\[COMMAND] substrings.
 \\=\\= quotes the following character and is discarded;
 thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ 
into the output.
 
-Returns original STRING if no substitutions were made.  Otherwise,
-a new string, without any text properties, is returned.  */)
+Return the original STRING if no substitutions are made.
+Otherwise, return a new string, without any text properties.  */)
   (Lisp_Object string)
 {
   char *buf;

=== modified file 'src/keymap.c'
--- a/src/keymap.c      2012-04-23 03:44:13 +0000
+++ b/src/keymap.c      2012-05-30 14:08:58 +0000
@@ -2978,9 +2978,9 @@
    If MENTION_SHADOW is nonzero, then when something is shadowed by SHADOW,
    don't omit it; instead, mention it but say it is shadowed.
 
-   Return whether something was inserted or not.  */
+   Any inserted text ends in two newlines (used by `help-make-xrefs').  */
 
-int
+void
 describe_map_tree (Lisp_Object startmap, int partial, Lisp_Object shadow,
                   Lisp_Object prefix, const char *title, int nomenu, int 
transl,
                   int always_title, int mention_shadow)
@@ -3090,8 +3090,10 @@
     skip: ;
     }
 
+  if (something)
+    insert_string ("\n");
+
   UNGCPRO;
-  return something;
 }
 
 static int previous_description_column;

=== modified file 'src/keymap.h'
--- a/src/keymap.h      2012-01-19 07:21:25 +0000
+++ b/src/keymap.h      2012-05-30 14:08:58 +0000
@@ -47,7 +47,7 @@
 extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, int, int, int);
 extern Lisp_Object get_keymap (Lisp_Object, int, int);
 EXFUN (Fset_keymap_parent, 2);
-extern int describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object,
+extern void describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object,
                              const char *, int, int, int, int);
 extern ptrdiff_t current_minor_maps (Lisp_Object **, Lisp_Object **);
 extern void initial_define_key (Lisp_Object, int, const char *);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]