1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 06:50:46 -08:00

(get_doc_string): When UNIBYTE and DEFINITION are 0,

let the data control whether string is unibyte.
This commit is contained in:
Richard M. Stallman 1999-04-06 19:50:49 +00:00
parent b91f7a6f35
commit fb2fdea71c

View file

@ -275,8 +275,15 @@ get_doc_string (filepos, unibyte, definition)
return make_unibyte_string (get_doc_string_buffer + offset,
to - (get_doc_string_buffer + offset));
else
return make_string (get_doc_string_buffer + offset,
to - (get_doc_string_buffer + offset));
{
/* Let the data determine whether the string is multibyte,
even if Emacs is running in --unibyte mode. */
int nchars = multibyte_chars_in_text (get_doc_string_buffer + offset,
to - (get_doc_string_buffer + offset));
return make_string_from_bytes (get_doc_string_buffer + offset,
nchars,
to - (get_doc_string_buffer + offset));
}
}
/* Get a string from position FILEPOS and pass it through the Lisp reader.