diff options
author | Karl Heuer <kwzh@gnu.org> | 1994-04-06 02:07:40 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1994-04-06 02:07:40 +0000 |
commit | e9dda228f2cfafeacabe734162d13ebf61f332fa (patch) | |
tree | e0c1215f070110762ea15a9b5d1f4bea44596ec5 /src/keymap.c | |
parent | 10e2ff0623ff5bf59789b5715edf1d87dc69f39a (diff) | |
download | emacs-e9dda228f2cfafeacabe734162d13ebf61f332fa.tar.gz |
(describe_buffer_bindings): Move XSYMBOL to after SYMBOLP.
Exclude trailing null in string copies.
Diffstat (limited to 'src/keymap.c')
-rw-r--r-- | src/keymap.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/keymap.c b/src/keymap.c index 1c403dcf234..f6e5b443fe2 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1807,15 +1807,15 @@ nominal alternate\n\ /* Print the minor mode maps. */ for (i = 0; i < nmaps; i++) { - /* Tht title for a minor mode keymap + /* The title for a minor mode keymap is constructed at run time. We let describe_map_tree do the actual insertion because it takes care of other features when doing so. */ - char *title = (char *) alloca (40 + XSYMBOL (modes[i])->name->size); - char *p = title; + char *title, *p; if (XTYPE (modes[i]) == Lisp_Symbol) { + p = title = (char *) alloca (40 + XSYMBOL (modes[i])->name->size); *p++ = '`'; bcopy (XSYMBOL (modes[i])->name->data, p, XSYMBOL (modes[i])->name->size); @@ -1824,11 +1824,12 @@ nominal alternate\n\ } else { - bcopy ("Strangely Named", p, sizeof ("Strangely Named")); - p += sizeof ("Strangely Named"); + p = title = (char *) alloca (40 + 20); + bcopy ("Strangely Named", p, sizeof ("Strangely Named") - 1); + p += sizeof ("Strangely Named") - 1; } - bcopy (" Minor Mode Bindings", p, sizeof (" Minor Mode Bindings")); - p += sizeof (" Minor Mode Bindings"); + bcopy (" Minor Mode Bindings", p, sizeof (" Minor Mode Bindings") - 1); + p += sizeof (" Minor Mode Bindings") - 1; *p = 0; describe_map_tree (maps[i], 0, shadow, prefix, title, 0); |