diff options
| -rw-r--r-- | src/doc.c | 11 |
1 files changed, 9 insertions, 2 deletions
| @@ -275,8 +275,15 @@ get_doc_string (filepos, unibyte, definition) | |||
| 275 | return make_unibyte_string (get_doc_string_buffer + offset, | 275 | return make_unibyte_string (get_doc_string_buffer + offset, |
| 276 | to - (get_doc_string_buffer + offset)); | 276 | to - (get_doc_string_buffer + offset)); |
| 277 | else | 277 | else |
| 278 | return make_string (get_doc_string_buffer + offset, | 278 | { |
| 279 | to - (get_doc_string_buffer + offset)); | 279 | /* Let the data determine whether the string is multibyte, |
| 280 | even if Emacs is running in --unibyte mode. */ | ||
| 281 | int nchars = multibyte_chars_in_text (get_doc_string_buffer + offset, | ||
| 282 | to - (get_doc_string_buffer + offset)); | ||
| 283 | return make_string_from_bytes (get_doc_string_buffer + offset, | ||
| 284 | nchars, | ||
| 285 | to - (get_doc_string_buffer + offset)); | ||
| 286 | } | ||
| 280 | } | 287 | } |
| 281 | 288 | ||
| 282 | /* Get a string from position FILEPOS and pass it through the Lisp reader. | 289 | /* Get a string from position FILEPOS and pass it through the Lisp reader. |