emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105022: (describe_map_tree): Don't i


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105022: (describe_map_tree): Don't insert a double newline at the end of the string
Date: Thu, 07 Jul 2011 19:19:10 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105022
fixes bug(s): http://debbugs.gnu.org/1169
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Thu 2011-07-07 19:19:10 +0200
message:
  (describe_map_tree): Don't insert a double newline at the end of the string
  
  Return whether we inserted something.  This should allow the caller to
  decide whether to insert more newlines or not.
modified:
  src/ChangeLog
  src/keymap.c
  src/keymap.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-07-07 16:59:26 +0000
+++ b/src/ChangeLog     2011-07-07 17:19:10 +0000
@@ -1,5 +1,9 @@
 2011-07-07  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * keymap.c (describe_map_tree): Don't insert a double newline at
+       the end of the buffer (bug#1169) and return whether we inserted
+       something.
+
        * callint.c (Fcall_interactively): Change "reading args" to
        "providing args" to try to clarify what it does (bug#1010).
 

=== modified file 'src/keymap.c'
--- a/src/keymap.c      2011-07-03 06:15:12 +0000
+++ b/src/keymap.c      2011-07-07 17:19:10 +0000
@@ -2951,9 +2951,11 @@
    to look through.
 
    If MENTION_SHADOW is nonzero, then when something is shadowed by SHADOW,
-   don't omit it; instead, mention it but say it is shadowed.  */
-
-void
+   don't omit it; instead, mention it but say it is shadowed.
+
+   Return whether something was inserted or not.  */
+
+int
 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)
@@ -3063,10 +3065,8 @@
     skip: ;
     }
 
-  if (something)
-    insert_string ("\n");
-
   UNGCPRO;
+  return something;
 }
 
 static int previous_description_column;

=== modified file 'src/keymap.h'
--- a/src/keymap.h      2011-04-11 01:41:15 +0000
+++ b/src/keymap.h      2011-07-07 17:19:10 +0000
@@ -36,8 +36,8 @@
 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 void describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object,
-                               const char *, int, int, int, int);
+extern int describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object,
+                             const char *, int, int, int, int);
 extern int current_minor_maps (Lisp_Object **, Lisp_Object **);
 extern void initial_define_key (Lisp_Object, int, const char *);
 extern void initial_define_lispy_key (Lisp_Object, const char *, const char *);


reply via email to

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