aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2002-03-03 20:06:11 +0000
committerRichard M. Stallman2002-03-03 20:06:11 +0000
commit81a268b48ca7990868f4f75589789afcff29c077 (patch)
tree5755f5a259b00f8a302c64e5e80f35bb9e538000 /src
parentae7367d33b9b0762667345b480f1ee3f22479828 (diff)
downloademacs-81a268b48ca7990868f4f75589789afcff29c077.tar.gz
emacs-81a268b48ca7990868f4f75589789afcff29c077.zip
(read1): When reading from a file, default string to
multibyte only if it has some multibyte characters.
Diffstat (limited to 'src')
-rw-r--r--src/lread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lread.c b/src/lread.c
index 10baf509918..5fa76b08280 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2260,9 +2260,11 @@ read1 (readcharfun, pch, first_in_list)
2260 compiled Emacs Lisp files, and those always use the 2260 compiled Emacs Lisp files, and those always use the
2261 Emacs internal encoding. Meanwhile, Qlambda is used 2261 Emacs internal encoding. Meanwhile, Qlambda is used
2262 for reading dynamic byte code (compiled with 2262 for reading dynamic byte code (compiled with
2263 byte-compile-dynamic = t). */ 2263 byte-compile-dynamic = t). So make the string multibyte
2264 if the string contains any multibyte sequences.
2265 (to_multibyte is a no-op if not.) */
2264 to_multibyte (&p, &end, &nchars); 2266 to_multibyte (&p, &end, &nchars);
2265 is_multibyte = 1; 2267 is_multibyte = (p - read_buffer) != nchars;
2266 } 2268 }
2267 else 2269 else
2268 /* In all other cases, if we read these bytes as 2270 /* In all other cases, if we read these bytes as