1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-17 10:06:13 +00: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.