diff options
| author | Richard M. Stallman | 1997-08-31 17:05:53 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-31 17:05:53 +0000 |
| commit | 3fe77f98b1c424aaaa17607fd805f7e81b83db34 (patch) | |
| tree | eab0ac70ba0689628c02de0f0014c0ed63238176 /lib-src | |
| parent | e27269847b66f61fcadc07753f89963392583ab3 (diff) | |
| download | emacs-3fe77f98b1c424aaaa17607fd805f7e81b83db34.tar.gz emacs-3fe77f98b1c424aaaa17607fd805f7e81b83db34.zip | |
(scan_lisp_file): Handle custom-declare-variable.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/make-docfile.c | 63 |
1 files changed, 62 insertions, 1 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index b0072672114..9fe30bd6c34 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Generate doc-string file for GNU Emacs from source files. | 1 | /* Generate doc-string file for GNU Emacs from source files. |
| 2 | Copyright (C) 1985, 1986, 1992, 1993, 1994 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 1986, 92, 93, 94, 1997 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -523,6 +523,7 @@ scan_c_file (filename, mode) | |||
| 523 | (fset (quote NAME) (make-byte-code ... DOCSTRING ...)) | 523 | (fset (quote NAME) (make-byte-code ... DOCSTRING ...)) |
| 524 | (fset (quote NAME) #[... DOCSTRING ...]) | 524 | (fset (quote NAME) #[... DOCSTRING ...]) |
| 525 | (defalias (quote NAME) #[... DOCSTRING ...]) | 525 | (defalias (quote NAME) #[... DOCSTRING ...]) |
| 526 | (custom-declare-variable (quote NAME) VALUE DOCSTRING ...) | ||
| 526 | starting in column zero. | 527 | starting in column zero. |
| 527 | (quote NAME) may appear as 'NAME as well. | 528 | (quote NAME) may appear as 'NAME as well. |
| 528 | 529 | ||
| @@ -732,6 +733,66 @@ scan_lisp_file (filename, mode) | |||
| 732 | } | 733 | } |
| 733 | } | 734 | } |
| 734 | 735 | ||
| 736 | else if (! strcmp (buffer, "custom-declare-variable")) | ||
| 737 | { | ||
| 738 | char c1 = 0, c2 = 0; | ||
| 739 | type = 'V'; | ||
| 740 | |||
| 741 | c = getc (infile); | ||
| 742 | if (c == '\'') | ||
| 743 | read_lisp_symbol (infile, buffer); | ||
| 744 | else | ||
| 745 | { | ||
| 746 | if (c != '(') | ||
| 747 | { | ||
| 748 | fprintf (stderr, | ||
| 749 | "## unparsable name in custom-declare-variable in %s\n", | ||
| 750 | filename); | ||
| 751 | continue; | ||
| 752 | } | ||
| 753 | read_lisp_symbol (infile, buffer); | ||
| 754 | if (strcmp (buffer, "quote")) | ||
| 755 | { | ||
| 756 | fprintf (stderr, | ||
| 757 | "## unparsable name in custom-declare-variable in %s\n", | ||
| 758 | filename); | ||
| 759 | continue; | ||
| 760 | } | ||
| 761 | read_lisp_symbol (infile, buffer); | ||
| 762 | c = getc (infile); | ||
| 763 | if (c != ')') | ||
| 764 | { | ||
| 765 | fprintf (stderr, | ||
| 766 | "## unparsable quoted name in custom-declare-variable in %s\n", | ||
| 767 | filename); | ||
| 768 | continue; | ||
| 769 | } | ||
| 770 | } | ||
| 771 | |||
| 772 | if (saved_string == 0) | ||
| 773 | { | ||
| 774 | /* Skip until the first newline; remember the two previous | ||
| 775 | chars. */ | ||
| 776 | while (c != '\n' && c >= 0) | ||
| 777 | { | ||
| 778 | c2 = c1; | ||
| 779 | c1 = c; | ||
| 780 | c = getc (infile); | ||
| 781 | } | ||
| 782 | |||
| 783 | /* If two previous characters were " and \, | ||
| 784 | this is a doc string. Otherwise, there is none. */ | ||
| 785 | if (c2 != '"' || c1 != '\\') | ||
| 786 | { | ||
| 787 | #ifdef DEBUG | ||
| 788 | fprintf (stderr, "## non-docstring in %s (%s)\n", | ||
| 789 | buffer, filename); | ||
| 790 | #endif | ||
| 791 | continue; | ||
| 792 | } | ||
| 793 | } | ||
| 794 | } | ||
| 795 | |||
| 735 | else if (! strcmp (buffer, "fset") || ! strcmp (buffer, "defalias")) | 796 | else if (! strcmp (buffer, "fset") || ! strcmp (buffer, "defalias")) |
| 736 | { | 797 | { |
| 737 | char c1 = 0, c2 = 0; | 798 | char c1 = 0, c2 = 0; |