aboutsummaryrefslogtreecommitdiffstats
path: root/src/doc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc.c')
-rw-r--r--src/doc.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/doc.c b/src/doc.c
index 9a7001eb01d..f8ab9d081b9 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -285,8 +285,7 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition)
285 to - (get_doc_string_buffer + offset)); 285 to - (get_doc_string_buffer + offset));
286 else 286 else
287 { 287 {
288 /* Let the data determine whether the string is multibyte, 288 /* The data determines whether the string is multibyte. */
289 even if Emacs is running in --unibyte mode. */
290 int nchars = multibyte_chars_in_text (get_doc_string_buffer + offset, 289 int nchars = multibyte_chars_in_text (get_doc_string_buffer + offset,
291 to - (get_doc_string_buffer + offset)); 290 to - (get_doc_string_buffer + offset));
292 return make_string_from_bytes (get_doc_string_buffer + offset, 291 return make_string_from_bytes (get_doc_string_buffer + offset,
@@ -622,24 +621,28 @@ the same file name is found in the `doc-directory'. */)
622 p = buf; 621 p = buf;
623 end = buf + (filled < 512 ? filled : filled - 128); 622 end = buf + (filled < 512 ? filled : filled - 128);
624 while (p != end && *p != '\037') p++; 623 while (p != end && *p != '\037') p++;
625 /* p points to ^_Ffunctionname\n or ^_Vvarname\n. */ 624 /* p points to ^_Ffunctionname\n or ^_Vvarname\n or ^_Sfilename\n. */
626 if (p != end) 625 if (p != end)
627 { 626 {
628 end = strchr (p, '\n'); 627 end = strchr (p, '\n');
629 628
630 /* See if this is a file name, and if it is a file in build-files. */ 629 /* See if this is a file name, and if it is a file in build-files. */
631 if (p[1] == 'S' && end - p > 4 && end[-2] == '.' 630 if (p[1] == 'S')
632 && (end[-1] == 'o' || end[-1] == 'c'))
633 { 631 {
634 int len = end - p - 2; 632 skip_file = 0;
635 char *fromfile = alloca (len + 1); 633 if (end - p > 4 && end[-2] == '.'
636 strncpy (fromfile, &p[2], len); 634 && (end[-1] == 'o' || end[-1] == 'c'))
637 fromfile[len] = 0; 635 {
638 if (fromfile[len-1] == 'c') 636 int len = end - p - 2;
639 fromfile[len-1] = 'o'; 637 char *fromfile = alloca (len + 1);
640 638 strncpy (fromfile, &p[2], len);
641 skip_file = NILP (Fmember (build_string (fromfile), 639 fromfile[len] = 0;
642 Vbuild_files)); 640 if (fromfile[len-1] == 'c')
641 fromfile[len-1] = 'o';
642
643 skip_file = NILP (Fmember (build_string (fromfile),
644 Vbuild_files));
645 }
643 } 646 }
644 647
645 sym = oblookup (Vobarray, p + 2, 648 sym = oblookup (Vobarray, p + 2,