diff options
| author | Kenichi Handa | 2010-08-25 14:15:20 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2010-08-25 14:15:20 +0900 |
| commit | 4e603db3429957e6b26953c177f00a9c9d1c8766 (patch) | |
| tree | 8206240e3006468bff9dfda5fb3696f80fbcb9f0 /src/doc.c | |
| parent | b60f961f6cdc1095e778ad624657bb57788512af (diff) | |
| parent | f6aa6ec68ed936800ef2c3aefa42102e60b654cb (diff) | |
| download | emacs-4e603db3429957e6b26953c177f00a9c9d1c8766.tar.gz emacs-4e603db3429957e6b26953c177f00a9c9d1c8766.zip | |
merge trunk
Diffstat (limited to 'src/doc.c')
| -rw-r--r-- | src/doc.c | 31 |
1 files changed, 17 insertions, 14 deletions
| @@ -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, |