aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan D2010-08-14 08:42:09 +0200
committerJan D2010-08-14 08:42:09 +0200
commit983b8302209c32043178edd8b89941857699d6b4 (patch)
treeeb5ee2976ee7a600a8c03d50c897644a610eb294 /src
parentec1339fbce4df95a3ae96b7796a28dfe6186db4e (diff)
downloademacs-983b8302209c32043178edd8b89941857699d6b4.tar.gz
emacs-983b8302209c32043178edd8b89941857699d6b4.zip
* doc.c (Fsnarf_documentation): Set skip_file only if p[1] is S.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/doc.c29
2 files changed, 20 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f36714d3792..2f011db3784 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12010-08-14 Jan Djärv <jan.h.d@swipnet.se>
2
3 * doc.c (Fsnarf_documentation): Set skip_file only if p[1] is S.
4
12010-08-13 Jan Djärv <jan.h.d@swipnet.se> 52010-08-13 Jan Djärv <jan.h.d@swipnet.se>
2 6
3 * doc.c (Fsnarf_documentation): Initialize skip_file before 7 * doc.c (Fsnarf_documentation): Initialize skip_file before
diff --git a/src/doc.c b/src/doc.c
index 6543eb41db1..d1cc6e48fcf 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -640,25 +640,28 @@ the same file name is found in the `doc-directory'. */)
640 p = buf; 640 p = buf;
641 end = buf + (filled < 512 ? filled : filled - 128); 641 end = buf + (filled < 512 ? filled : filled - 128);
642 while (p != end && *p != '\037') p++; 642 while (p != end && *p != '\037') p++;
643 /* p points to ^_Ffunctionname\n or ^_Vvarname\n. */ 643 /* p points to ^_Ffunctionname\n or ^_Vvarname\n or ^_Sfilename\n. */
644 if (p != end) 644 if (p != end)
645 { 645 {
646 end = (char *) index (p, '\n'); 646 end = (char *) index (p, '\n');
647 skip_file = 0;
648 647
649 /* See if this is a file name, and if it is a file in build-files. */ 648 /* See if this is a file name, and if it is a file in build-files. */
650 if (p[1] == 'S' && end - p > 4 && end[-2] == '.' 649 if (p[1] == 'S')
651 && (end[-1] == 'o' || end[-1] == 'c'))
652 { 650 {
653 int len = end - p - 2; 651 skip_file = 0;
654 char *fromfile = alloca (len + 1); 652 if (end - p > 4 && end[-2] == '.'
655 strncpy (fromfile, &p[2], len); 653 && (end[-1] == 'o' || end[-1] == 'c'))
656 fromfile[len] = 0; 654 {
657 if (fromfile[len-1] == 'c') 655 int len = end - p - 2;
658 fromfile[len-1] = 'o'; 656 char *fromfile = alloca (len + 1);
659 657 strncpy (fromfile, &p[2], len);
660 skip_file = NILP (Fmember (build_string (fromfile), 658 fromfile[len] = 0;
661 Vbuild_files)); 659 if (fromfile[len-1] == 'c')
660 fromfile[len-1] = 'o';
661
662 skip_file = NILP (Fmember (build_string (fromfile),
663 Vbuild_files));
664 }
662 } 665 }
663 666
664 sym = oblookup (Vobarray, p + 2, 667 sym = oblookup (Vobarray, p + 2,