From 59e624b37b84a4915d1f05e8fe77e48d941499f4 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Fri, 25 Jan 2013 21:13:31 +0400 Subject: [PATCH] * insdel.c (insert_1): Remove. * lisp.h (insert_1): Remove prototype. * xdisp.c (message_dolog): Adjust users to call insert_1_both. --- src/ChangeLog | 3 +++ src/insdel.c | 11 ----------- src/lisp.h | 1 - src/xdisp.c | 7 ++++--- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c6152668a22..e147889f796 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -6,6 +6,9 @@ * font.c (num_fonts): Remove the leftover from old debugging code. Adjust comment style here and there. + * insdel.c (insert_1): Remove. + * lisp.h (insert_1): Remove prototype. + * xdisp.c (message_dolog): Adjust users to call insert_1_both. 2013-01-25 Eli Zaretskii diff --git a/src/insdel.c b/src/insdel.c index 303247816ca..4cf4e6452a1 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -658,17 +658,6 @@ insert_before_markers_and_inherit (const char *string, } } -/* Subroutine used by the insert functions above. */ - -void -insert_1 (const char *string, ptrdiff_t nbytes, - bool inherit, bool prepare, bool before_markers) -{ - insert_1_both (string, chars_in_text ((unsigned char *) string, nbytes), - nbytes, inherit, prepare, before_markers); -} - - #ifdef BYTE_COMBINING_DEBUG /* See if the bytes before POS/POS_BYTE combine with bytes diff --git a/src/lisp.h b/src/lisp.h index 04cefc8fe66..2e9088f1834 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2874,7 +2874,6 @@ extern int count_combining_after (const unsigned char *, ptrdiff_t, ptrdiff_t, ptrdiff_t); extern void insert (const char *, ptrdiff_t); extern void insert_and_inherit (const char *, ptrdiff_t); -extern void insert_1 (const char *, ptrdiff_t, bool, bool, bool); extern void insert_1_both (const char *, ptrdiff_t, ptrdiff_t, bool, bool, bool); extern void insert_from_gap (ptrdiff_t, ptrdiff_t); diff --git a/src/xdisp.c b/src/xdisp.c index 68ee4417c72..0169238e994 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -9462,13 +9462,14 @@ message_dolog (const char *m, ptrdiff_t nbytes, int nlflag, int multibyte) } } else if (nbytes) - insert_1 (m, nbytes, 1, 0, 0); + insert_1_both (m, chars_in_text (msg, nbytes), nbytes, 1, 0, 0); if (nlflag) { ptrdiff_t this_bol, this_bol_byte, prev_bol, prev_bol_byte; printmax_t dups; - insert_1 ("\n", 1, 1, 0, 0); + + insert_1_both ("\n", 1, 1, 1, 0, 0); scan_newline (Z, Z_BYTE, BEG, BEG_BYTE, -2, 0); this_bol = PT; @@ -9497,7 +9498,7 @@ message_dolog (const char *m, ptrdiff_t nbytes, int nlflag, int multibyte) change message_log_check_duplicate. */ int duplen = sprintf (dupstr, " [%"pMd" times]", dups); TEMP_SET_PT_BOTH (Z - 1, Z_BYTE - 1); - insert_1 (dupstr, duplen, 1, 0, 1); + insert_1_both (dupstr, duplen, duplen, 1, 0, 1); } } } -- 2.39.2