diff options
| author | Richard M. Stallman | 1999-04-06 19:50:49 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1999-04-06 19:50:49 +0000 |
| commit | fb2fdea71ca69f2d4d2b569b5e91c5b14c07645c (patch) | |
| tree | c1d18bccc37e8300fd9849c1477beb21a5204ca3 | |
| parent | b91f7a6f3514d374895d607e409115a0e4fe02a9 (diff) | |
| download | emacs-fb2fdea71ca69f2d4d2b569b5e91c5b14c07645c.tar.gz emacs-fb2fdea71ca69f2d4d2b569b5e91c5b14c07645c.zip | |
(get_doc_string): When UNIBYTE and DEFINITION are 0,
let the data control whether string is unibyte.
| -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. |