diff options
| author | Lars Magne Ingebrigtsen | 2011-07-07 19:19:10 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2011-07-07 19:19:10 +0200 |
| commit | 9888ff71e38a45c471074bf270be90cd5280ec49 (patch) | |
| tree | af4c0d456286c8fb2004e6489e660144b048d765 | |
| parent | 54e101844312f87d5283db5fd078d0756264caa2 (diff) | |
| download | emacs-9888ff71e38a45c471074bf270be90cd5280ec49.tar.gz emacs-9888ff71e38a45c471074bf270be90cd5280ec49.zip | |
(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.
Fixes: debbugs:1169
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/keymap.c | 10 | ||||
| -rw-r--r-- | src/keymap.h | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8c1af2a27ce..4cacc677c23 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org> | 1 | 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 2 | ||
| 3 | * keymap.c (describe_map_tree): Don't insert a double newline at | ||
| 4 | the end of the buffer (bug#1169) and return whether we inserted | ||
| 5 | something. | ||
| 6 | |||
| 3 | * callint.c (Fcall_interactively): Change "reading args" to | 7 | * callint.c (Fcall_interactively): Change "reading args" to |
| 4 | "providing args" to try to clarify what it does (bug#1010). | 8 | "providing args" to try to clarify what it does (bug#1010). |
| 5 | 9 | ||
diff --git a/src/keymap.c b/src/keymap.c index be31f72eec6..d33af68be48 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2951,9 +2951,11 @@ You type Translation\n\ | |||
| 2951 | to look through. | 2951 | to look through. |
| 2952 | 2952 | ||
| 2953 | If MENTION_SHADOW is nonzero, then when something is shadowed by SHADOW, | 2953 | If MENTION_SHADOW is nonzero, then when something is shadowed by SHADOW, |
| 2954 | don't omit it; instead, mention it but say it is shadowed. */ | 2954 | don't omit it; instead, mention it but say it is shadowed. |
| 2955 | 2955 | ||
| 2956 | void | 2956 | Return whether something was inserted or not. */ |
| 2957 | |||
| 2958 | int | ||
| 2957 | describe_map_tree (Lisp_Object startmap, int partial, Lisp_Object shadow, | 2959 | describe_map_tree (Lisp_Object startmap, int partial, Lisp_Object shadow, |
| 2958 | Lisp_Object prefix, const char *title, int nomenu, int transl, | 2960 | Lisp_Object prefix, const char *title, int nomenu, int transl, |
| 2959 | int always_title, int mention_shadow) | 2961 | int always_title, int mention_shadow) |
| @@ -3063,10 +3065,8 @@ key binding\n\ | |||
| 3063 | skip: ; | 3065 | skip: ; |
| 3064 | } | 3066 | } |
| 3065 | 3067 | ||
| 3066 | if (something) | ||
| 3067 | insert_string ("\n"); | ||
| 3068 | |||
| 3069 | UNGCPRO; | 3068 | UNGCPRO; |
| 3069 | return something; | ||
| 3070 | } | 3070 | } |
| 3071 | 3071 | ||
| 3072 | static int previous_description_column; | 3072 | static int previous_description_column; |
diff --git a/src/keymap.h b/src/keymap.h index 2b9d58b39dc..2c826b64e1f 100644 --- a/src/keymap.h +++ b/src/keymap.h | |||
| @@ -36,8 +36,8 @@ EXFUN (Fcurrent_active_maps, 2); | |||
| 36 | extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, int, int, int); | 36 | extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, int, int, int); |
| 37 | extern Lisp_Object get_keymap (Lisp_Object, int, int); | 37 | extern Lisp_Object get_keymap (Lisp_Object, int, int); |
| 38 | EXFUN (Fset_keymap_parent, 2); | 38 | EXFUN (Fset_keymap_parent, 2); |
| 39 | extern void describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object, | 39 | extern int describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object, |
| 40 | const char *, int, int, int, int); | 40 | const char *, int, int, int, int); |
| 41 | extern int current_minor_maps (Lisp_Object **, Lisp_Object **); | 41 | extern int current_minor_maps (Lisp_Object **, Lisp_Object **); |
| 42 | extern void initial_define_key (Lisp_Object, int, const char *); | 42 | extern void initial_define_key (Lisp_Object, int, const char *); |
| 43 | extern void initial_define_lispy_key (Lisp_Object, const char *, const char *); | 43 | extern void initial_define_lispy_key (Lisp_Object, const char *, const char *); |