diff options
| author | Joakim Verona | 2012-05-30 14:08:12 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-05-30 14:08:12 +0200 |
| commit | 70700d8c47a35b19e29607ac5f0ed322bdd78249 (patch) | |
| tree | 4fa00d3fac00025354f0b6e23dcda1b58689a094 /lib-src | |
| parent | 44fce8ffe7198991c41c985ff4e67ec7d407907e (diff) | |
| parent | 72cb32cf2f0938dd7dc733eed77b1ed1e497b053 (diff) | |
| download | emacs-70700d8c47a35b19e29607ac5f0ed322bdd78249.tar.gz emacs-70700d8c47a35b19e29607ac5f0ed322bdd78249.zip | |
upstream
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 52 | ||||
| -rw-r--r-- | lib-src/Makefile.in | 1 | ||||
| -rw-r--r-- | lib-src/make-docfile.c | 153 |
3 files changed, 84 insertions, 122 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index b32e0607c94..d95137852e0 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * make-docfile.c: Improve comment style. | ||
| 4 | (search_lisp_doc_at_eol): New function. | ||
| 5 | (scan_lisp_file): Use it. | ||
| 6 | |||
| 7 | 2012-05-26 Glenn Morris <rgm@gnu.org> | ||
| 8 | |||
| 9 | * Makefile.in (INSTALL_DATA): Remove; unused. | ||
| 10 | |||
| 1 | 2012-05-22 Paul Eggert <eggert@cs.ucla.edu> | 11 | 2012-05-22 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 12 | ||
| 3 | Remove src/m/*. | 13 | Remove src/m/*. |
| @@ -437,8 +447,8 @@ | |||
| 437 | 447 | ||
| 438 | * etags.c (canonicalize_filename, ISUPPER): Fix last change. | 448 | * etags.c (canonicalize_filename, ISUPPER): Fix last change. |
| 439 | 449 | ||
| 440 | * makefile.w32-in ($(BLD)/ebrowse.$(O), $(BLD)/pop.$(O)): Depend | 450 | * makefile.w32-in ($(BLD)/ebrowse.$(O), $(BLD)/pop.$(O)): |
| 441 | on ../lib/min-max.h. | 451 | Depend on ../lib/min-max.h. |
| 442 | 452 | ||
| 443 | 2011-02-22 Paul Eggert <eggert@cs.ucla.edu> | 453 | 2011-02-22 Paul Eggert <eggert@cs.ucla.edu> |
| 444 | 454 | ||
| @@ -2815,7 +2825,7 @@ | |||
| 2815 | 2825 | ||
| 2816 | * make-docfile.c (read_c_string_or_comment): Declare msgno. | 2826 | * make-docfile.c (read_c_string_or_comment): Declare msgno. |
| 2817 | 2827 | ||
| 2818 | * Makefile.in (YACC): Deleted. | 2828 | * Makefile.in (YACC): Delete. |
| 2819 | 2829 | ||
| 2820 | 2002-10-19 Andreas Schwab <schwab@suse.de> | 2830 | 2002-10-19 Andreas Schwab <schwab@suse.de> |
| 2821 | 2831 | ||
| @@ -3033,7 +3043,7 @@ | |||
| 3033 | (TeX_commands): Names now include the initial backslash. | 3043 | (TeX_commands): Names now include the initial backslash. |
| 3034 | (TeX_commands): Names do not include numeric args #n. | 3044 | (TeX_commands): Names do not include numeric args #n. |
| 3035 | (TeX_commands): Correct line char number in tags. | 3045 | (TeX_commands): Correct line char number in tags. |
| 3036 | (TEX_tabent, TEX_token): Deleted. | 3046 | (TEX_tabent, TEX_token): Delete. |
| 3037 | (TeX_commands, TEX_decode_env): Streamlined. | 3047 | (TeX_commands, TEX_decode_env): Streamlined. |
| 3038 | 3048 | ||
| 3039 | 2002-06-05 Francesco Potortì <pot@gnu.org> | 3049 | 2002-06-05 Francesco Potortì <pot@gnu.org> |
| @@ -3074,7 +3084,7 @@ | |||
| 3074 | (main): New argument -d, for specifying directory. | 3084 | (main): New argument -d, for specifying directory. |
| 3075 | (usage): Document. | 3085 | (usage): Document. |
| 3076 | (get_user_id): Compute. | 3086 | (get_user_id): Compute. |
| 3077 | (get_home_dir): Deleted. | 3087 | (get_home_dir): Delete. |
| 3078 | (get_prefix): New function, taken from main. | 3088 | (get_prefix): New function, taken from main. |
| 3079 | (main): Check whether or not we are running setuid. Move prefix | 3089 | (main): Check whether or not we are running setuid. Move prefix |
| 3080 | computation to get_prefix. Don't call getpwent; we don't need to | 3090 | computation to get_prefix. Don't call getpwent; we don't need to |
| @@ -3335,7 +3345,7 @@ | |||
| 3335 | (LOOKING_AT, get_tag, PHP_functions): Use notinname. | 3345 | (LOOKING_AT, get_tag, PHP_functions): Use notinname. |
| 3336 | (Ada_getit, Ada_funcs, Python_functions, Scheme_functions): | 3346 | (Ada_getit, Ada_funcs, Python_functions, Scheme_functions): |
| 3337 | Clarified, using strneq or notinname. | 3347 | Clarified, using strneq or notinname. |
| 3338 | (L_isdef, L_isquote): Removed. | 3348 | (L_isdef, L_isquote): Remove. |
| 3339 | (Lisp_functions, L_getit): Clarified. | 3349 | (Lisp_functions, L_getit): Clarified. |
| 3340 | 3350 | ||
| 3341 | * etags.c (P_): Rename to __P for consistency with config.h. | 3351 | * etags.c (P_): Rename to __P for consistency with config.h. |
| @@ -3772,7 +3782,7 @@ | |||
| 3772 | comma when --declarations is used. | 3782 | comma when --declarations is used. |
| 3773 | (C_entries): More accurate tagging of members and declarations. | 3783 | (C_entries): More accurate tagging of members and declarations. |
| 3774 | (yacc_rules): Was global, made local to C_entries. | 3784 | (yacc_rules): Was global, made local to C_entries. |
| 3775 | (next_token_is_func): Removed. | 3785 | (next_token_is_func): Remove. |
| 3776 | (fvdef): New constants fdefunkey, fdefunname. | 3786 | (fvdef): New constants fdefunkey, fdefunname. |
| 3777 | (consider_token, C_entries): Use them. | 3787 | (consider_token, C_entries): Use them. |
| 3778 | (C_entries): Build proper lisp names for Emacs DEFUNs. | 3788 | (C_entries): Build proper lisp names for Emacs DEFUNs. |
| @@ -4248,7 +4258,7 @@ | |||
| 4248 | (find_entries, takeprec, getit, Fortran_functions, Perl_functions) | 4258 | (find_entries, takeprec, getit, Fortran_functions, Perl_functions) |
| 4249 | (Python_functions, L_getit, Lisp_functions, Scheme_functions) | 4259 | (Python_functions, L_getit, Lisp_functions, Scheme_functions) |
| 4250 | (prolog_pred, erlanf_func, erlang_attribute): Use them. | 4260 | (prolog_pred, erlanf_func, erlang_attribute): Use them. |
| 4251 | (eat_white): Deleted. | 4261 | (eat_white): Delete. |
| 4252 | 4262 | ||
| 4253 | * etags.c (CHAR, init): Keep into account non US-ASCII | 4263 | * etags.c (CHAR, init): Keep into account non US-ASCII |
| 4254 | characters and compilers with default signed chars. | 4264 | characters and compilers with default signed chars. |
| @@ -4771,7 +4781,7 @@ | |||
| 4771 | 1997-05-13 Francesco Potortì <F.Potorti@cnuce.cnr.it> | 4781 | 1997-05-13 Francesco Potortì <F.Potorti@cnuce.cnr.it> |
| 4772 | 4782 | ||
| 4773 | * etags.c (TeX_functions): Cleaned up. | 4783 | * etags.c (TeX_functions): Cleaned up. |
| 4774 | (tex_getit): Removed. | 4784 | (tex_getit): Remove. |
| 4775 | 4785 | ||
| 4776 | 1997-05-13 Paul Eggert <eggert@twinsun.com> | 4786 | 1997-05-13 Paul Eggert <eggert@twinsun.com> |
| 4777 | 4787 | ||
| @@ -5292,7 +5302,7 @@ | |||
| 5292 | 5302 | ||
| 5293 | * etags.c: Prolog language totally rewritten. | 5303 | * etags.c: Prolog language totally rewritten. |
| 5294 | (Prolog_functions): Rewritten from scratch. | 5304 | (Prolog_functions): Rewritten from scratch. |
| 5295 | (skip_comment, prolog_getit): Removed. | 5305 | (skip_comment, prolog_getit): Remove. |
| 5296 | (prolog_skip_comment): New function, like old skip_comment. | 5306 | (prolog_skip_comment): New function, like old skip_comment. |
| 5297 | (prolog_pred, prolog_atom, prolog_white): New functions. | 5307 | (prolog_pred, prolog_atom, prolog_white): New functions. |
| 5298 | (erlang_func, erlang_attributes): Forward declarations added. | 5308 | (erlang_func, erlang_attributes): Forward declarations added. |
| @@ -5793,7 +5803,7 @@ | |||
| 5793 | 5803 | ||
| 5794 | 1995-01-12 Francesco Potortì (pot@cnuce.cnr.it) | 5804 | 1995-01-12 Francesco Potortì (pot@cnuce.cnr.it) |
| 5795 | 5805 | ||
| 5796 | * etags.c (FILEPOS, GET_CHARNO, GET_FILEPOS, max, LINENO): Deleted. | 5806 | * etags.c (FILEPOS, GET_CHARNO, GET_FILEPOS, max, LINENO): Delete. |
| 5797 | (append_to_tagfile, typedefs, typedefs_and_cplusplus) | 5807 | (append_to_tagfile, typedefs, typedefs_and_cplusplus) |
| 5798 | (constantypedefs, update, vgrind_style, no_warnings) | 5808 | (constantypedefs, update, vgrind_style, no_warnings) |
| 5799 | (cxref_style, cplusplus, noindentypedefs): Were int, now logical. | 5809 | (cxref_style, cplusplus, noindentypedefs): Were int, now logical. |
| @@ -5812,9 +5822,9 @@ | |||
| 5812 | (consider_token): Don't take a token as argument. Use savenstr | 5822 | (consider_token): Don't take a token as argument. Use savenstr |
| 5813 | when saving a tag in structtag. Callers changed. | 5823 | when saving a tag in structtag. Callers changed. |
| 5814 | (TOKEN): Structure changed. Now used only in C_entries. | 5824 | (TOKEN): Structure changed. Now used only in C_entries. |
| 5815 | (TOKEN_SAVED_P, SAVE_TOKEN, RESTORE_TOKEN): Deleted. | 5825 | (TOKEN_SAVED_P, SAVE_TOKEN, RESTORE_TOKEN): Delete. |
| 5816 | (C_entries): nameb and savenameb deleted. Use dinamic allocation. | 5826 | (C_entries): nameb and savenameb deleted. Use dinamic allocation. |
| 5817 | (pfcnt): Deleted. Users updated. | 5827 | (pfcnt): Delete. Users updated. |
| 5818 | (getit, Asm_labels, Pascal_functions, L_getit, get_scheme) | 5828 | (getit, Asm_labels, Pascal_functions, L_getit, get_scheme) |
| 5819 | (TEX_getit, prolog_getit): Use dinamic allocation for storing | 5829 | (TEX_getit, prolog_getit): Use dinamic allocation for storing |
| 5820 | the tag instead of a fixed size buffer. | 5830 | the tag instead of a fixed size buffer. |
| @@ -6390,7 +6400,7 @@ | |||
| 6390 | 6400 | ||
| 6391 | 1994-03-25 Francesco Potortì (pot@cnuce.cnr.it) | 6401 | 1994-03-25 Francesco Potortì (pot@cnuce.cnr.it) |
| 6392 | 6402 | ||
| 6393 | * etags.c (emacs_tags_format, ETAGS): Removed. Use CTAGS instead. | 6403 | * etags.c (emacs_tags_format, ETAGS): Remove. Use CTAGS instead. |
| 6394 | (main): Don't allow the use of -t and -T in etags mode. | 6404 | (main): Don't allow the use of -t and -T in etags mode. |
| 6395 | (print_help): Don't show options enabled by default. | 6405 | (print_help): Don't show options enabled by default. |
| 6396 | (print_version): Show the emacs version number if VERSION is #defined. | 6406 | (print_version): Show the emacs version number if VERSION is #defined. |
| @@ -6507,9 +6517,9 @@ | |||
| 6507 | 1994-01-14 Francesco Potortì (pot@cnuce.cnr.it) | 6517 | 1994-01-14 Francesco Potortì (pot@cnuce.cnr.it) |
| 6508 | 6518 | ||
| 6509 | * etags.c (stab_entry, stab_create, stab_find, stab_search, | 6519 | * etags.c (stab_entry, stab_create, stab_find, stab_search, |
| 6510 | stab_type, add_keyword, C_reate_stab, C_create_stabs): Deleted. | 6520 | stab_type, add_keyword, C_reate_stab, C_create_stabs): Delete. |
| 6511 | Use gperf generated hash table instead of linked list. | 6521 | Use gperf generated hash table instead of linked list. |
| 6512 | (C_stab_entry, hash, in_word_set, get_C_stab, C_symtype): Added. | 6522 | (C_stab_entry, hash, in_word_set, get_C_stab, C_symtype): Add. |
| 6513 | Mostly code generated by gperf. | 6523 | Mostly code generated by gperf. |
| 6514 | (consider_token): Remove unused parameter `lp'. | 6524 | (consider_token): Remove unused parameter `lp'. |
| 6515 | (PF_funcs, getit): Allow subroutine and similar declarations | 6525 | (PF_funcs, getit): Allow subroutine and similar declarations |
| @@ -6828,7 +6838,7 @@ | |||
| 6828 | * etags.c (consider_token): Was `==', now is `='. | 6838 | * etags.c (consider_token): Was `==', now is `='. |
| 6829 | (consider_token): DEFUNs now treated like funcs in ctags mode. | 6839 | (consider_token): DEFUNs now treated like funcs in ctags mode. |
| 6830 | 6840 | ||
| 6831 | * etags.c (LEVEL_OK_FOR_FUNCDEF): Removed. | 6841 | * etags.c (LEVEL_OK_FOR_FUNCDEF): Remove. |
| 6832 | (C_entries): Optimized the test that used LEVEL_OK_FOR_FUNCDEF. | 6842 | (C_entries): Optimized the test that used LEVEL_OK_FOR_FUNCDEF. |
| 6833 | (C_entries): Remove a piece of useless code. | 6843 | (C_entries): Remove a piece of useless code. |
| 6834 | (C_entries): Making typedef tags is delayed until a semicolon | 6844 | (C_entries): Making typedef tags is delayed until a semicolon |
| @@ -7127,10 +7137,10 @@ | |||
| 7127 | * etags.c (GET_COOKIE): And related macros removed. | 7137 | * etags.c (GET_COOKIE): And related macros removed. |
| 7128 | (logical): Is now int, no more a char. | 7138 | (logical): Is now int, no more a char. |
| 7129 | (reg): Define deleted. | 7139 | (reg): Define deleted. |
| 7130 | (isgood, _gd, notgd): Deleted. | 7140 | (isgood, _gd, notgd): Delete. |
| 7131 | (gotone): Deleted. | 7141 | (gotone): Delete. |
| 7132 | (TOKEN): Member linestart removed. | 7142 | (TOKEN): Member linestart removed. |
| 7133 | (linepos, prev_linepos, lb1): Deleted. | 7143 | (linepos, prev_linepos, lb1): Delete. |
| 7134 | (main): Call initbuffer on lbs array instead of lb1. | 7144 | (main): Call initbuffer on lbs array instead of lb1. |
| 7135 | (init): Remove the initialization of the logical _gd array. | 7145 | (init): Remove the initialization of the logical _gd array. |
| 7136 | (find_entries): A .sa suffix means assembler file. | 7146 | (find_entries): A .sa suffix means assembler file. |
| @@ -7138,7 +7148,7 @@ | |||
| 7138 | All C state machines rewritten. | 7148 | All C state machines rewritten. |
| 7139 | (C_entries): Complete rewrite. | 7149 | (C_entries): Complete rewrite. |
| 7140 | (condider_token): Complete rewrite. | 7150 | (condider_token): Complete rewrite. |
| 7141 | (getline): Deleted. | 7151 | (getline): Delete. |
| 7142 | 7152 | ||
| 7143 | 1993-03-01 Francesco Potortì (pot@fly.CNUCE.CNR.IT) | 7153 | 1993-03-01 Francesco Potortì (pot@fly.CNUCE.CNR.IT) |
| 7144 | 7154 | ||
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 75dd8788870..f1ad84f4d44 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -106,7 +106,6 @@ gameuser=@gameuser@ | |||
| 106 | # ../configure figures out the correct values for these. | 106 | # ../configure figures out the correct values for these. |
| 107 | INSTALL = @INSTALL@ | 107 | INSTALL = @INSTALL@ |
| 108 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | 108 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
| 109 | INSTALL_DATA = @INSTALL_DATA@ | ||
| 110 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | 109 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
| 111 | # By default, we uphold the dignity of our programs. | 110 | # By default, we uphold the dignity of our programs. |
| 112 | INSTALL_STRIP = | 111 | INSTALL_STRIP = |
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index b33b13f34ce..1314a7b6829 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c | |||
| @@ -35,7 +35,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 35 | 35 | ||
| 36 | #include <config.h> | 36 | #include <config.h> |
| 37 | 37 | ||
| 38 | /* defined to be emacs_main, sys_fopen, etc. in config.h */ | 38 | /* Defined to be emacs_main, sys_fopen, etc. in config.h. */ |
| 39 | #undef main | 39 | #undef main |
| 40 | #undef fopen | 40 | #undef fopen |
| 41 | #undef chdir | 41 | #undef chdir |
| @@ -66,7 +66,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 66 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP) | 66 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP) |
| 67 | #endif | 67 | #endif |
| 68 | 68 | ||
| 69 | /* Use this to suppress gcc's `...may be used before initialized' warnings. */ | 69 | /* Use this to suppress gcc's `...may be used before initialized' warnings. */ |
| 70 | #ifdef lint | 70 | #ifdef lint |
| 71 | # define IF_LINT(Code) Code | 71 | # define IF_LINT(Code) Code |
| 72 | #else | 72 | #else |
| @@ -226,7 +226,7 @@ put_filename (char *filename) | |||
| 226 | 226 | ||
| 227 | for (tmp = filename; *tmp; tmp++) | 227 | for (tmp = filename; *tmp; tmp++) |
| 228 | { | 228 | { |
| 229 | if (IS_DIRECTORY_SEP(*tmp)) | 229 | if (IS_DIRECTORY_SEP (*tmp)) |
| 230 | filename = tmp + 1; | 230 | filename = tmp + 1; |
| 231 | } | 231 | } |
| 232 | 232 | ||
| @@ -675,14 +675,14 @@ scan_c_file (char *filename, const char *mode) | |||
| 675 | 675 | ||
| 676 | if (infile == NULL && extension == 'o') | 676 | if (infile == NULL && extension == 'o') |
| 677 | { | 677 | { |
| 678 | /* try .m */ | 678 | /* Try .m. */ |
| 679 | filename[strlen (filename) - 1] = 'm'; | 679 | filename[strlen (filename) - 1] = 'm'; |
| 680 | infile = fopen (filename, mode); | 680 | infile = fopen (filename, mode); |
| 681 | if (infile == NULL) | 681 | if (infile == NULL) |
| 682 | filename[strlen (filename) - 1] = 'c'; /* don't confuse people */ | 682 | filename[strlen (filename) - 1] = 'c'; /* Don't confuse people. */ |
| 683 | } | 683 | } |
| 684 | 684 | ||
| 685 | /* No error if non-ex input file */ | 685 | /* No error if non-ex input file. */ |
| 686 | if (infile == NULL) | 686 | if (infile == NULL) |
| 687 | { | 687 | { |
| 688 | perror (filename); | 688 | perror (filename); |
| @@ -800,8 +800,8 @@ scan_c_file (char *filename, const char *mode) | |||
| 800 | input_buffer[i++] = c; | 800 | input_buffer[i++] = c; |
| 801 | c = getc (infile); | 801 | c = getc (infile); |
| 802 | } | 802 | } |
| 803 | while (! (c == ',' || c == ' ' || c == '\t' || | 803 | while (! (c == ',' || c == ' ' || c == '\t' |
| 804 | c == '\n' || c == '\r')); | 804 | || c == '\n' || c == '\r')); |
| 805 | input_buffer[i] = '\0'; | 805 | input_buffer[i] = '\0'; |
| 806 | 806 | ||
| 807 | name = xmalloc (i + 1); | 807 | name = xmalloc (i + 1); |
| @@ -820,7 +820,7 @@ scan_c_file (char *filename, const char *mode) | |||
| 820 | commas = 3; | 820 | commas = 3; |
| 821 | else if (defvarflag) | 821 | else if (defvarflag) |
| 822 | commas = 1; | 822 | commas = 1; |
| 823 | else /* For DEFSIMPLE and DEFPRED */ | 823 | else /* For DEFSIMPLE and DEFPRED. */ |
| 824 | commas = 2; | 824 | commas = 2; |
| 825 | 825 | ||
| 826 | while (commas) | 826 | while (commas) |
| @@ -838,9 +838,9 @@ scan_c_file (char *filename, const char *mode) | |||
| 838 | if (c < 0) | 838 | if (c < 0) |
| 839 | goto eof; | 839 | goto eof; |
| 840 | ungetc (c, infile); | 840 | ungetc (c, infile); |
| 841 | if (commas == 2) /* pick up minargs */ | 841 | if (commas == 2) /* Pick up minargs. */ |
| 842 | scanned = fscanf (infile, "%d", &minargs); | 842 | scanned = fscanf (infile, "%d", &minargs); |
| 843 | else /* pick up maxargs */ | 843 | else /* Pick up maxargs. */ |
| 844 | if (c == 'M' || c == 'U') /* MANY || UNEVALLED */ | 844 | if (c == 'M' || c == 'U') /* MANY || UNEVALLED */ |
| 845 | maxargs = -1; | 845 | maxargs = -1; |
| 846 | else | 846 | else |
| @@ -893,7 +893,7 @@ scan_c_file (char *filename, const char *mode) | |||
| 893 | fprintf (outfile, "%s\n", input_buffer); | 893 | fprintf (outfile, "%s\n", input_buffer); |
| 894 | 894 | ||
| 895 | if (comment) | 895 | if (comment) |
| 896 | getc (infile); /* Skip past `*' */ | 896 | getc (infile); /* Skip past `*'. */ |
| 897 | c = read_c_string_or_comment (infile, 1, comment, &saw_usage); | 897 | c = read_c_string_or_comment (infile, 1, comment, &saw_usage); |
| 898 | 898 | ||
| 899 | /* If this is a defun, find the arguments and print them. If | 899 | /* If this is a defun, find the arguments and print them. If |
| @@ -979,7 +979,7 @@ scan_c_file (char *filename, const char *mode) | |||
| 979 | problem because byte-compiler output follows this convention. | 979 | problem because byte-compiler output follows this convention. |
| 980 | The NAME and DOCSTRING are output. | 980 | The NAME and DOCSTRING are output. |
| 981 | NAME is preceded by `F' for a function or `V' for a variable. | 981 | NAME is preceded by `F' for a function or `V' for a variable. |
| 982 | An entry is output only if DOCSTRING has \ newline just after the opening " | 982 | An entry is output only if DOCSTRING has \ newline just after the opening ". |
| 983 | */ | 983 | */ |
| 984 | 984 | ||
| 985 | static void | 985 | static void |
| @@ -1020,6 +1020,32 @@ read_lisp_symbol (FILE *infile, char *buffer) | |||
| 1020 | } | 1020 | } |
| 1021 | 1021 | ||
| 1022 | static int | 1022 | static int |
| 1023 | search_lisp_doc_at_eol (FILE *infile) | ||
| 1024 | { | ||
| 1025 | char c = 0, c1 = 0, c2 = 0; | ||
| 1026 | |||
| 1027 | /* Skip until the end of line; remember two previous chars. */ | ||
| 1028 | while (c != '\n' && c != '\r' && c >= 0) | ||
| 1029 | { | ||
| 1030 | c2 = c1; | ||
| 1031 | c1 = c; | ||
| 1032 | c = getc (infile); | ||
| 1033 | } | ||
| 1034 | |||
| 1035 | /* If two previous characters were " and \, | ||
| 1036 | this is a doc string. Otherwise, there is none. */ | ||
| 1037 | if (c2 != '"' || c1 != '\\') | ||
| 1038 | { | ||
| 1039 | #ifdef DEBUG | ||
| 1040 | fprintf (stderr, "## non-docstring in %s (%s)\n", | ||
| 1041 | buffer, filename); | ||
| 1042 | #endif | ||
| 1043 | return 0; | ||
| 1044 | } | ||
| 1045 | return 1; | ||
| 1046 | } | ||
| 1047 | |||
| 1048 | static int | ||
| 1023 | scan_lisp_file (const char *filename, const char *mode) | 1049 | scan_lisp_file (const char *filename, const char *mode) |
| 1024 | { | 1050 | { |
| 1025 | FILE *infile; | 1051 | FILE *infile; |
| @@ -1033,7 +1059,7 @@ scan_lisp_file (const char *filename, const char *mode) | |||
| 1033 | if (infile == NULL) | 1059 | if (infile == NULL) |
| 1034 | { | 1060 | { |
| 1035 | perror (filename); | 1061 | perror (filename); |
| 1036 | return 0; /* No error */ | 1062 | return 0; /* No error. */ |
| 1037 | } | 1063 | } |
| 1038 | 1064 | ||
| 1039 | c = '\n'; | 1065 | c = '\n'; |
| @@ -1110,7 +1136,7 @@ scan_lisp_file (const char *filename, const char *mode) | |||
| 1110 | type = 'F'; | 1136 | type = 'F'; |
| 1111 | read_lisp_symbol (infile, buffer); | 1137 | read_lisp_symbol (infile, buffer); |
| 1112 | 1138 | ||
| 1113 | /* Skip the arguments: either "nil" or a list in parens */ | 1139 | /* Skip the arguments: either "nil" or a list in parens. */ |
| 1114 | 1140 | ||
| 1115 | c = getc (infile); | 1141 | c = getc (infile); |
| 1116 | if (c == 'n') /* nil */ | 1142 | if (c == 'n') /* nil */ |
| @@ -1154,39 +1180,18 @@ scan_lisp_file (const char *filename, const char *mode) | |||
| 1154 | || ! strcmp (buffer, "defconst") | 1180 | || ! strcmp (buffer, "defconst") |
| 1155 | || ! strcmp (buffer, "defcustom")) | 1181 | || ! strcmp (buffer, "defcustom")) |
| 1156 | { | 1182 | { |
| 1157 | char c1 = 0, c2 = 0; | ||
| 1158 | type = 'V'; | 1183 | type = 'V'; |
| 1159 | read_lisp_symbol (infile, buffer); | 1184 | read_lisp_symbol (infile, buffer); |
| 1160 | 1185 | ||
| 1161 | if (saved_string == 0) | 1186 | if (saved_string == 0) |
| 1162 | { | 1187 | if (!search_lisp_doc_at_eol (infile)) |
| 1163 | 1188 | continue; | |
| 1164 | /* Skip until the end of line; remember two previous chars. */ | ||
| 1165 | while (c != '\n' && c != '\r' && c >= 0) | ||
| 1166 | { | ||
| 1167 | c2 = c1; | ||
| 1168 | c1 = c; | ||
| 1169 | c = getc (infile); | ||
| 1170 | } | ||
| 1171 | |||
| 1172 | /* If two previous characters were " and \, | ||
| 1173 | this is a doc string. Otherwise, there is none. */ | ||
| 1174 | if (c2 != '"' || c1 != '\\') | ||
| 1175 | { | ||
| 1176 | #ifdef DEBUG | ||
| 1177 | fprintf (stderr, "## non-docstring in %s (%s)\n", | ||
| 1178 | buffer, filename); | ||
| 1179 | #endif | ||
| 1180 | continue; | ||
| 1181 | } | ||
| 1182 | } | ||
| 1183 | } | 1189 | } |
| 1184 | 1190 | ||
| 1185 | else if (! strcmp (buffer, "custom-declare-variable") | 1191 | else if (! strcmp (buffer, "custom-declare-variable") |
| 1186 | || ! strcmp (buffer, "defvaralias") | 1192 | || ! strcmp (buffer, "defvaralias") |
| 1187 | ) | 1193 | ) |
| 1188 | { | 1194 | { |
| 1189 | char c1 = 0, c2 = 0; | ||
| 1190 | type = 'V'; | 1195 | type = 'V'; |
| 1191 | 1196 | ||
| 1192 | c = getc (infile); | 1197 | c = getc (infile); |
| @@ -1221,31 +1226,12 @@ scan_lisp_file (const char *filename, const char *mode) | |||
| 1221 | } | 1226 | } |
| 1222 | 1227 | ||
| 1223 | if (saved_string == 0) | 1228 | if (saved_string == 0) |
| 1224 | { | 1229 | if (!search_lisp_doc_at_eol (infile)) |
| 1225 | /* Skip to end of line; remember the two previous chars. */ | 1230 | continue; |
| 1226 | while (c != '\n' && c != '\r' && c >= 0) | ||
| 1227 | { | ||
| 1228 | c2 = c1; | ||
| 1229 | c1 = c; | ||
| 1230 | c = getc (infile); | ||
| 1231 | } | ||
| 1232 | |||
| 1233 | /* If two previous characters were " and \, | ||
| 1234 | this is a doc string. Otherwise, there is none. */ | ||
| 1235 | if (c2 != '"' || c1 != '\\') | ||
| 1236 | { | ||
| 1237 | #ifdef DEBUG | ||
| 1238 | fprintf (stderr, "## non-docstring in %s (%s)\n", | ||
| 1239 | buffer, filename); | ||
| 1240 | #endif | ||
| 1241 | continue; | ||
| 1242 | } | ||
| 1243 | } | ||
| 1244 | } | 1231 | } |
| 1245 | 1232 | ||
| 1246 | else if (! strcmp (buffer, "fset") || ! strcmp (buffer, "defalias")) | 1233 | else if (! strcmp (buffer, "fset") || ! strcmp (buffer, "defalias")) |
| 1247 | { | 1234 | { |
| 1248 | char c1 = 0, c2 = 0; | ||
| 1249 | type = 'F'; | 1235 | type = 'F'; |
| 1250 | 1236 | ||
| 1251 | c = getc (infile); | 1237 | c = getc (infile); |
| @@ -1278,26 +1264,8 @@ scan_lisp_file (const char *filename, const char *mode) | |||
| 1278 | } | 1264 | } |
| 1279 | 1265 | ||
| 1280 | if (saved_string == 0) | 1266 | if (saved_string == 0) |
| 1281 | { | 1267 | if (!search_lisp_doc_at_eol (infile)) |
| 1282 | /* Skip to end of line; remember the two previous chars. */ | 1268 | continue; |
| 1283 | while (c != '\n' && c != '\r' && c >= 0) | ||
| 1284 | { | ||
| 1285 | c2 = c1; | ||
| 1286 | c1 = c; | ||
| 1287 | c = getc (infile); | ||
| 1288 | } | ||
| 1289 | |||
| 1290 | /* If two previous characters were " and \, | ||
| 1291 | this is a doc string. Otherwise, there is none. */ | ||
| 1292 | if (c2 != '"' || c1 != '\\') | ||
| 1293 | { | ||
| 1294 | #ifdef DEBUG | ||
| 1295 | fprintf (stderr, "## non-docstring in %s (%s)\n", | ||
| 1296 | buffer, filename); | ||
| 1297 | #endif | ||
| 1298 | continue; | ||
| 1299 | } | ||
| 1300 | } | ||
| 1301 | } | 1269 | } |
| 1302 | 1270 | ||
| 1303 | else if (! strcmp (buffer, "autoload")) | 1271 | else if (! strcmp (buffer, "autoload")) |
| @@ -1339,23 +1307,10 @@ scan_lisp_file (const char *filename, const char *mode) | |||
| 1339 | continue; | 1307 | continue; |
| 1340 | } | 1308 | } |
| 1341 | read_c_string_or_comment (infile, 0, 0, 0); | 1309 | read_c_string_or_comment (infile, 0, 0, 0); |
| 1342 | skip_white (infile); | ||
| 1343 | 1310 | ||
| 1344 | if (saved_string == 0) | 1311 | if (saved_string == 0) |
| 1345 | { | 1312 | if (!search_lisp_doc_at_eol (infile)) |
| 1346 | /* If the next three characters aren't `dquote bslash newline' | 1313 | continue; |
| 1347 | then we're not reading a docstring. */ | ||
| 1348 | if ((c = getc (infile)) != '"' | ||
| 1349 | || (c = getc (infile)) != '\\' | ||
| 1350 | || ((c = getc (infile)) != '\n' && c != '\r')) | ||
| 1351 | { | ||
| 1352 | #ifdef DEBUG | ||
| 1353 | fprintf (stderr, "## non-docstring in %s (%s)\n", | ||
| 1354 | buffer, filename); | ||
| 1355 | #endif | ||
| 1356 | continue; | ||
| 1357 | } | ||
| 1358 | } | ||
| 1359 | } | 1314 | } |
| 1360 | 1315 | ||
| 1361 | #ifdef DEBUG | 1316 | #ifdef DEBUG |
| @@ -1373,12 +1328,10 @@ scan_lisp_file (const char *filename, const char *mode) | |||
| 1373 | continue; | 1328 | continue; |
| 1374 | } | 1329 | } |
| 1375 | 1330 | ||
| 1376 | /* At this point, we should either use the previous | 1331 | /* At this point, we should either use the previous dynamic doc string in |
| 1377 | dynamic doc string in saved_string | 1332 | saved_string or gobble a doc string from the input file. |
| 1378 | or gobble a doc string from the input file. | 1333 | In the latter case, the opening quote (and leading backslash-newline) |
| 1379 | 1334 | have already been read. */ | |
| 1380 | In the latter case, the opening quote (and leading | ||
| 1381 | backslash-newline) have already been read. */ | ||
| 1382 | 1335 | ||
| 1383 | putc (037, outfile); | 1336 | putc (037, outfile); |
| 1384 | putc (type, outfile); | 1337 | putc (type, outfile); |