]> git.eshelyaron.com Git - emacs.git/commitdiff
(get_next_display_element): In unibyte case, don't use
authorKenichi Handa <handa@m17n.org>
Tue, 27 Aug 2002 01:04:54 +0000 (01:04 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 27 Aug 2002 01:04:54 +0000 (01:04 +0000)
octal form for such eight-bit characters that can be converted to
multibyte char.

src/ChangeLog
src/xdisp.c

index bd092152d9e5baddcfeacb220b8f3b00cd072a05..672c2ec67ad79b20ac195be5b62ac6360a17bc6d 100644 (file)
@@ -1,3 +1,9 @@
+2002-08-27  Kenichi Handa  <handa@etl.go.jp>
+
+       * xdisp.c (get_next_display_element): In unibyte case, don't use
+       octal form for such eight-bit characters that can be converted to
+       multibyte char.
+
 2002-08-26  Kim F. Storm  <storm@cua.dk>
 
        * frame.c (make_terminal_frame) [CANNOT_DUMP]: Initialize
index 340660f4f55320fb5d31ebc1b9aec3d2c0a3e05a..e5a8a50c67dcfdd5d5e2b9d5d033db506fa601d5 100644 (file)
@@ -4215,14 +4215,22 @@ get_next_display_element (it)
             the translation.  This could easily be changed but I
             don't believe that it is worth doing.
 
-            Non-printable multibyte characters are also translated
-            octal form.  */
-         else if ((it->c < ' '
+            If it->multibyte_p is nonzero, eight-bit characters and
+            non-printable multibyte characters are also translated to
+            octal form.
+
+            If it->multibyte_p is zero, eight-bit characters that
+            don't have corresponding multibyte char code are also
+            translated to octal form.  */
+         else if (((it->c < ' ' || it->c == 127)
                    && (it->area != TEXT_AREA
                        || (it->c != '\n' && it->c != '\t')))
-                  || (it->c >= 127
-                      && it->len == 1)
-                  || !CHAR_PRINTABLE_P (it->c))
+                  || (it->multibyte_p
+                      ? ((it->c >= 127
+                          && it->len == 1)
+                         || !CHAR_PRINTABLE_P (it->c))
+                      : (it->c >= 128
+                         && it->c == unibyte_char_to_multibyte (it->c))))
            {
              /* IT->c is a control character which must be displayed
                 either as '\003' or as `^C' where the '\\' and '^'