aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1994-04-06 02:07:40 +0000
committerKarl Heuer1994-04-06 02:07:40 +0000
commitc9b7c53a8263f5433b08ca6b824daaf064397704 (patch)
treef1675f93928ce4eb49a5835b4aeae01cc8d92c5d /src
parent9572a9dd074eb67c2dfa5f19d409c1028f5d72b8 (diff)
downloademacs-c9b7c53a8263f5433b08ca6b824daaf064397704.tar.gz
emacs-c9b7c53a8263f5433b08ca6b824daaf064397704.zip
(describe_buffer_bindings): Move XSYMBOL to after SYMBOLP.
Exclude trailing null in string copies.
Diffstat (limited to 'src')
-rw-r--r--src/keymap.c15
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\
1807 /* Print the minor mode maps. */ 1807 /* Print the minor mode maps. */
1808 for (i = 0; i < nmaps; i++) 1808 for (i = 0; i < nmaps; i++)
1809 { 1809 {
1810 /* Tht title for a minor mode keymap 1810 /* The title for a minor mode keymap
1811 is constructed at run time. 1811 is constructed at run time.
1812 We let describe_map_tree do the actual insertion 1812 We let describe_map_tree do the actual insertion
1813 because it takes care of other features when doing so. */ 1813 because it takes care of other features when doing so. */
1814 char *title = (char *) alloca (40 + XSYMBOL (modes[i])->name->size); 1814 char *title, *p;
1815 char *p = title;
1816 1815
1817 if (XTYPE (modes[i]) == Lisp_Symbol) 1816 if (XTYPE (modes[i]) == Lisp_Symbol)
1818 { 1817 {
1818 p = title = (char *) alloca (40 + XSYMBOL (modes[i])->name->size);
1819 *p++ = '`'; 1819 *p++ = '`';
1820 bcopy (XSYMBOL (modes[i])->name->data, p, 1820 bcopy (XSYMBOL (modes[i])->name->data, p,
1821 XSYMBOL (modes[i])->name->size); 1821 XSYMBOL (modes[i])->name->size);
@@ -1824,11 +1824,12 @@ nominal alternate\n\
1824 } 1824 }
1825 else 1825 else
1826 { 1826 {
1827 bcopy ("Strangely Named", p, sizeof ("Strangely Named")); 1827 p = title = (char *) alloca (40 + 20);
1828 p += sizeof ("Strangely Named"); 1828 bcopy ("Strangely Named", p, sizeof ("Strangely Named") - 1);
1829 p += sizeof ("Strangely Named") - 1;
1829 } 1830 }
1830 bcopy (" Minor Mode Bindings", p, sizeof (" Minor Mode Bindings")); 1831 bcopy (" Minor Mode Bindings", p, sizeof (" Minor Mode Bindings") - 1);
1831 p += sizeof (" Minor Mode Bindings"); 1832 p += sizeof (" Minor Mode Bindings") - 1;
1832 *p = 0; 1833 *p = 0;
1833 1834
1834 describe_map_tree (maps[i], 0, shadow, prefix, title, 0); 1835 describe_map_tree (maps[i], 0, shadow, prefix, title, 0);