mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-27 07:37:33 +00:00
(read1): When reading from a file, default string to
multibyte only if it has some multibyte characters.
This commit is contained in:
parent
ae7367d33b
commit
81a268b48c
@ -2260,9 +2260,11 @@ read1 (readcharfun, pch, first_in_list)
|
||||
compiled Emacs Lisp files, and those always use the
|
||||
Emacs internal encoding. Meanwhile, Qlambda is used
|
||||
for reading dynamic byte code (compiled with
|
||||
byte-compile-dynamic = t). */
|
||||
byte-compile-dynamic = t). So make the string multibyte
|
||||
if the string contains any multibyte sequences.
|
||||
(to_multibyte is a no-op if not.) */
|
||||
to_multibyte (&p, &end, &nchars);
|
||||
is_multibyte = 1;
|
||||
is_multibyte = (p - read_buffer) != nchars;
|
||||
}
|
||||
else
|
||||
/* In all other cases, if we read these bytes as
|
||||
|
Loading…
Reference in New Issue
Block a user