Mercurial > emacs
comparison src/doc.c @ 109923:ac121cf6d1fc
* doc.c (Fsnarf_documentation): Set skip_file only if p[1] is S.
author | Jan D <jan.h.d@swipnet.se> |
---|---|
date | Sat, 14 Aug 2010 08:42:09 +0200 |
parents | 1d18d0c81be1 |
children | 53205019b195 376148b31b5e |
comparison
equal
deleted
inserted
replaced
109922:91b062787a2c | 109923:ac121cf6d1fc |
---|---|
638 | 638 |
639 buf[filled] = 0; | 639 buf[filled] = 0; |
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, |
665 multibyte_chars_in_text (p + 2, end - p - 2), | 668 multibyte_chars_in_text (p + 2, end - p - 2), |
666 end - p - 2); | 669 end - p - 2); |