aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1999-04-06 19:50:49 +0000
committerRichard M. Stallman1999-04-06 19:50:49 +0000
commitfb2fdea71ca69f2d4d2b569b5e91c5b14c07645c (patch)
treec1d18bccc37e8300fd9849c1477beb21a5204ca3 /src
parentb91f7a6f3514d374895d607e409115a0e4fe02a9 (diff)
downloademacs-fb2fdea71ca69f2d4d2b569b5e91c5b14c07645c.tar.gz
emacs-fb2fdea71ca69f2d4d2b569b5e91c5b14c07645c.zip
(get_doc_string): When UNIBYTE and DEFINITION are 0,
let the data control whether string is unibyte.
Diffstat (limited to 'src')
-rw-r--r--src/doc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/doc.c b/src/doc.c
index a28fd58793b..af7c55e0b20 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -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.