From: Richard M. Stallman Date: Wed, 21 Jan 1998 22:00:26 +0000 (+0000) Subject: (message_dolog): Use unibyte_char_to_multibyte. X-Git-Tag: emacs-20.3~2371 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6f0429a9a6765abee7cefba18c82ac8e3a5c30f2;p=emacs.git (message_dolog): Use unibyte_char_to_multibyte. Pass different args to scan_newline. Properly compare oldpoint with Z. --- diff --git a/src/xdisp.c b/src/xdisp.c index 6b936a4d1f3..0c7ce90781f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1,5 +1,5 @@ /* Display generation from window structure and buffer text. - Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 1997 + Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 97, 1998 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -51,8 +51,6 @@ extern int command_loop_level; extern int minibuffer_auto_raise; -extern int nonascii_insert_offset; - extern Lisp_Object Qface; extern Lisp_Object Voverriding_local_map; @@ -301,9 +299,9 @@ message_dolog (m, len, nlflag, multibyte) oldbegv = Fpoint_min_marker (); oldzv = Fpoint_max_marker (); - if (oldpoint == Z) + if (PT == Z) point_at_end = 1; - if (oldzv == Z) + if (ZV == Z) zv_at_end = 1; BEGV = BEG; @@ -334,15 +332,12 @@ message_dolog (m, len, nlflag, multibyte) else if (! multibyte && ! NILP (current_buffer->enable_multibyte_characters)) { - int c, i = 0; + int i = 0; /* Convert a single-byte string to multibyte for the *Message* buffer. */ while (i < len) { - c = m[i++]; - /* Convert non-ascii chars as if for self-insert. */ - if (c >= 0200 && c <= 0377) - c += nonascii_insert_offset; + int c = unibyte_char_to_multibyte (m[i++]); insert_char (c); } } @@ -360,7 +355,7 @@ message_dolog (m, len, nlflag, multibyte) if (this_bol > BEG) { - scan_newline (Z, Z_BYTE, BEG, BEG_BYTE, -2, 0); + scan_newline (PT, PT_BYTE, BEG, BEG_BYTE, -2, 0); prev_bol = PT; prev_bol_byte = PT_BYTE;