diff options
| author | Joakim Verona | 2013-07-02 22:46:17 +0200 |
|---|---|---|
| committer | Joakim Verona | 2013-07-02 22:46:17 +0200 |
| commit | 3718127221fbbc31f8ebd027ab7c95403dbe9118 (patch) | |
| tree | ef422898f3344c8f94f6ecf63eb583122bbf2bd8 /src/doc.c | |
| parent | 1ce45b902c67b8a0dda8d71bd2812de29a9988a6 (diff) | |
| parent | a3b49114c186d84404226af75ae7905bd1cd018f (diff) | |
| download | emacs-3718127221fbbc31f8ebd027ab7c95403dbe9118.tar.gz emacs-3718127221fbbc31f8ebd027ab7c95403dbe9118.zip | |
Merge branch 'trunk' into xwidget
Conflicts:
src/window.c
Diffstat (limited to 'src/doc.c')
| -rw-r--r-- | src/doc.c | 33 |
1 files changed, 10 insertions, 23 deletions
| @@ -33,7 +33,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 33 | #include "buffer.h" | 33 | #include "buffer.h" |
| 34 | #include "keyboard.h" | 34 | #include "keyboard.h" |
| 35 | #include "keymap.h" | 35 | #include "keymap.h" |
| 36 | #include "buildobj.h" | ||
| 37 | 36 | ||
| 38 | Lisp_Object Qfunction_documentation; | 37 | Lisp_Object Qfunction_documentation; |
| 39 | 38 | ||
| @@ -555,7 +554,6 @@ store_function_docstring (Lisp_Object obj, ptrdiff_t offset) | |||
| 555 | } | 554 | } |
| 556 | } | 555 | } |
| 557 | 556 | ||
| 558 | static const char buildobj[] = BUILDOBJ; | ||
| 559 | 557 | ||
| 560 | DEFUN ("Snarf-documentation", Fsnarf_documentation, Ssnarf_documentation, | 558 | DEFUN ("Snarf-documentation", Fsnarf_documentation, Ssnarf_documentation, |
| 561 | 1, 1, 0, | 559 | 1, 1, 0, |
| @@ -598,27 +596,16 @@ the same file name is found in the `doc-directory'. */) | |||
| 598 | 596 | ||
| 599 | /* Vbuild_files is nil when temacs is run, and non-nil after that. */ | 597 | /* Vbuild_files is nil when temacs is run, and non-nil after that. */ |
| 600 | if (NILP (Vbuild_files)) | 598 | if (NILP (Vbuild_files)) |
| 601 | { | 599 | { |
| 602 | const char *beg, *end; | 600 | static char const *const buildobj[] = |
| 603 | 601 | { | |
| 604 | for (beg = buildobj; *beg; beg = end) | 602 | #include "buildobj.h" |
| 605 | { | 603 | }; |
| 606 | ptrdiff_t len; | 604 | int i = sizeof buildobj / sizeof *buildobj; |
| 607 | 605 | while (0 <= --i) | |
| 608 | while (*beg && c_isspace (*beg)) ++beg; | 606 | Vbuild_files = Fcons (build_string (buildobj[i]), Vbuild_files); |
| 609 | 607 | Vbuild_files = Fpurecopy (Vbuild_files); | |
| 610 | for (end = beg; *end && ! c_isspace (*end); ++end) | 608 | } |
| 611 | if (*end == '/') beg = end + 1; /* Skip directory part. */ | ||
| 612 | |||
| 613 | len = end - beg; | ||
| 614 | if (len > 4 && end[-4] == '.' && end[-3] == 'o') | ||
| 615 | len -= 2; /* Just take .o if it ends in .obj */ | ||
| 616 | |||
| 617 | if (len > 0) | ||
| 618 | Vbuild_files = Fcons (make_string (beg, len), Vbuild_files); | ||
| 619 | } | ||
| 620 | Vbuild_files = Fpurecopy (Vbuild_files); | ||
| 621 | } | ||
| 622 | 609 | ||
| 623 | fd = emacs_open (name, O_RDONLY, 0); | 610 | fd = emacs_open (name, O_RDONLY, 0); |
| 624 | if (fd < 0) | 611 | if (fd < 0) |