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:
parent
b91f7a6f35
commit
fb2fdea71c
1 changed files with 9 additions and 2 deletions
11
src/doc.c
11
src/doc.c
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue