- return make_string (get_doc_string_buffer + offset,
- to - (get_doc_string_buffer + offset));
+ /* If DEFINITION, read from this buffer
+ the same way we would read bytes from a file. */
+ if (definition)
+ {
+ read_bytecode_pointer = get_doc_string_buffer + offset;
+ return Fread (Qlambda);
+ }
+
+ if (unibyte)
+ return make_unibyte_string (get_doc_string_buffer + offset,
+ to - (get_doc_string_buffer + offset));
+ else
+ {
+ /* 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));
+ }