diff options
| author | Richard M. Stallman | 1998-01-21 22:00:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-01-21 22:00:26 +0000 |
| commit | 6f0429a9a6765abee7cefba18c82ac8e3a5c30f2 (patch) | |
| tree | 562600f57cdeef20d3f8ff2dbf402884626104ec /src | |
| parent | 2e9dc125273510c615a4139d3320d70c9ae798ef (diff) | |
| download | emacs-6f0429a9a6765abee7cefba18c82ac8e3a5c30f2.tar.gz emacs-6f0429a9a6765abee7cefba18c82ac8e3a5c30f2.zip | |
(message_dolog): Use unibyte_char_to_multibyte.
Pass different args to scan_newline.
Properly compare oldpoint with Z.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 17 |
1 files changed, 6 insertions, 11 deletions
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 @@ | |||
| 1 | /* Display generation from window structure and buffer text. | 1 | /* Display generation from window structure and buffer text. |
| 2 | Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 1997 | 2 | Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 97, 1998 |
| 3 | Free Software Foundation, Inc. | 3 | Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -51,8 +51,6 @@ extern int command_loop_level; | |||
| 51 | 51 | ||
| 52 | extern int minibuffer_auto_raise; | 52 | extern int minibuffer_auto_raise; |
| 53 | 53 | ||
| 54 | extern int nonascii_insert_offset; | ||
| 55 | |||
| 56 | extern Lisp_Object Qface; | 54 | extern Lisp_Object Qface; |
| 57 | 55 | ||
| 58 | extern Lisp_Object Voverriding_local_map; | 56 | extern Lisp_Object Voverriding_local_map; |
| @@ -301,9 +299,9 @@ message_dolog (m, len, nlflag, multibyte) | |||
| 301 | oldbegv = Fpoint_min_marker (); | 299 | oldbegv = Fpoint_min_marker (); |
| 302 | oldzv = Fpoint_max_marker (); | 300 | oldzv = Fpoint_max_marker (); |
| 303 | 301 | ||
| 304 | if (oldpoint == Z) | 302 | if (PT == Z) |
| 305 | point_at_end = 1; | 303 | point_at_end = 1; |
| 306 | if (oldzv == Z) | 304 | if (ZV == Z) |
| 307 | zv_at_end = 1; | 305 | zv_at_end = 1; |
| 308 | 306 | ||
| 309 | BEGV = BEG; | 307 | BEGV = BEG; |
| @@ -334,15 +332,12 @@ message_dolog (m, len, nlflag, multibyte) | |||
| 334 | else if (! multibyte | 332 | else if (! multibyte |
| 335 | && ! NILP (current_buffer->enable_multibyte_characters)) | 333 | && ! NILP (current_buffer->enable_multibyte_characters)) |
| 336 | { | 334 | { |
| 337 | int c, i = 0; | 335 | int i = 0; |
| 338 | /* Convert a single-byte string to multibyte | 336 | /* Convert a single-byte string to multibyte |
| 339 | for the *Message* buffer. */ | 337 | for the *Message* buffer. */ |
| 340 | while (i < len) | 338 | while (i < len) |
| 341 | { | 339 | { |
| 342 | c = m[i++]; | 340 | int c = unibyte_char_to_multibyte (m[i++]); |
| 343 | /* Convert non-ascii chars as if for self-insert. */ | ||
| 344 | if (c >= 0200 && c <= 0377) | ||
| 345 | c += nonascii_insert_offset; | ||
| 346 | insert_char (c); | 341 | insert_char (c); |
| 347 | } | 342 | } |
| 348 | } | 343 | } |
| @@ -360,7 +355,7 @@ message_dolog (m, len, nlflag, multibyte) | |||
| 360 | 355 | ||
| 361 | if (this_bol > BEG) | 356 | if (this_bol > BEG) |
| 362 | { | 357 | { |
| 363 | scan_newline (Z, Z_BYTE, BEG, BEG_BYTE, -2, 0); | 358 | scan_newline (PT, PT_BYTE, BEG, BEG_BYTE, -2, 0); |
| 364 | prev_bol = PT; | 359 | prev_bol = PT; |
| 365 | prev_bol_byte = PT_BYTE; | 360 | prev_bol_byte = PT_BYTE; |
| 366 | 361 | ||