diff options
| author | Stefan Monnier | 2010-09-13 16:40:48 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-09-13 16:40:48 +0200 |
| commit | cc390e46c7ba95b76ea133d98fd386214cd01709 (patch) | |
| tree | ead4400d22bd07214b782ff7e46e79d473fac419 /src/doc.c | |
| parent | c566235d981eba73c88bbff00b6a1d88360b6e9f (diff) | |
| parent | c5fe4acb5fb456d6e8e147d8bc7981ce56c5c03d (diff) | |
| download | emacs-cc390e46c7ba95b76ea133d98fd386214cd01709.tar.gz emacs-cc390e46c7ba95b76ea133d98fd386214cd01709.zip | |
Merge from trunk
Diffstat (limited to 'src/doc.c')
| -rw-r--r-- | src/doc.c | 31 |
1 files changed, 17 insertions, 14 deletions
| @@ -286,8 +286,7 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition) | |||
| 286 | to - (get_doc_string_buffer + offset)); | 286 | to - (get_doc_string_buffer + offset)); |
| 287 | else | 287 | else |
| 288 | { | 288 | { |
| 289 | /* Let the data determine whether the string is multibyte, | 289 | /* The data determines whether the string is multibyte. */ |
| 290 | even if Emacs is running in --unibyte mode. */ | ||
| 291 | int nchars = multibyte_chars_in_text (get_doc_string_buffer + offset, | 290 | int nchars = multibyte_chars_in_text (get_doc_string_buffer + offset, |
| 292 | to - (get_doc_string_buffer + offset)); | 291 | to - (get_doc_string_buffer + offset)); |
| 293 | return make_string_from_bytes (get_doc_string_buffer + offset, | 292 | return make_string_from_bytes (get_doc_string_buffer + offset, |
| @@ -632,24 +631,28 @@ the same file name is found in the `doc-directory'. */) | |||
| 632 | p = buf; | 631 | p = buf; |
| 633 | end = buf + (filled < 512 ? filled : filled - 128); | 632 | end = buf + (filled < 512 ? filled : filled - 128); |
| 634 | while (p != end && *p != '\037') p++; | 633 | while (p != end && *p != '\037') p++; |
| 635 | /* p points to ^_Ffunctionname\n or ^_Vvarname\n. */ | 634 | /* p points to ^_Ffunctionname\n or ^_Vvarname\n or ^_Sfilename\n. */ |
| 636 | if (p != end) | 635 | if (p != end) |
| 637 | { | 636 | { |
| 638 | end = strchr (p, '\n'); | 637 | end = strchr (p, '\n'); |
| 639 | 638 | ||
| 640 | /* See if this is a file name, and if it is a file in build-files. */ | 639 | /* See if this is a file name, and if it is a file in build-files. */ |
| 641 | if (p[1] == 'S' && end - p > 4 && end[-2] == '.' | 640 | if (p[1] == 'S') |
| 642 | && (end[-1] == 'o' || end[-1] == 'c')) | ||
| 643 | { | 641 | { |
| 644 | int len = end - p - 2; | 642 | skip_file = 0; |
| 645 | char *fromfile = alloca (len + 1); | 643 | if (end - p > 4 && end[-2] == '.' |
| 646 | strncpy (fromfile, &p[2], len); | 644 | && (end[-1] == 'o' || end[-1] == 'c')) |
| 647 | fromfile[len] = 0; | 645 | { |
| 648 | if (fromfile[len-1] == 'c') | 646 | int len = end - p - 2; |
| 649 | fromfile[len-1] = 'o'; | 647 | char *fromfile = alloca (len + 1); |
| 650 | 648 | strncpy (fromfile, &p[2], len); | |
| 651 | skip_file = NILP (Fmember (build_string (fromfile), | 649 | fromfile[len] = 0; |
| 652 | Vbuild_files)); | 650 | if (fromfile[len-1] == 'c') |
| 651 | fromfile[len-1] = 'o'; | ||
| 652 | |||
| 653 | skip_file = NILP (Fmember (build_string (fromfile), | ||
| 654 | Vbuild_files)); | ||
| 655 | } | ||
| 653 | } | 656 | } |
| 654 | 657 | ||
| 655 | sym = oblookup (Vobarray, p + 2, | 658 | sym = oblookup (Vobarray, p + 2, |