diff options
| author | Dan Nicolaescu | 2010-07-08 14:25:08 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-08 14:25:08 -0700 |
| commit | 5842a27bbfb7efa6872824e501bc7ec98b631553 (patch) | |
| tree | d173899af9cbed9d90d94cfc710e6ecc06dd1f6b /src/syntax.c | |
| parent | 71c44c04bb996abe77db8efd88255fde06532b10 (diff) | |
| download | emacs-5842a27bbfb7efa6872824e501bc7ec98b631553.tar.gz emacs-5842a27bbfb7efa6872824e501bc7ec98b631553.zip | |
Convert DEFUNs to standard C.
* src/alloc.c: Convert DEFUNs to standard C.
* src/buffer.c:
* src/bytecode.c:
* src/callint.c:
* src/callproc.c:
* src/casefiddle.c:
* src/casetab.c:
* src/category.c:
* src/character.c:
* src/charset.c:
* src/chartab.c:
* src/cmds.c:
* src/coding.c:
* src/composite.c:
* src/data.c:
* src/dbusbind.c:
* src/dired.c:
* src/dispnew.c:
* src/doc.c:
* src/dosfns.c:
* src/editfns.c:
* src/emacs.c:
* src/eval.c:
* src/fileio.c:
* src/filelock.c:
* src/floatfns.c:
* src/fns.c:
* src/font.c:
* src/fontset.c:
* src/frame.c:
* src/fringe.c:
* src/image.c:
* src/indent.c:
* src/insdel.c:
* src/keyboard.c:
* src/keymap.c:
* src/lread.c:
* src/macros.c:
* src/marker.c:
* src/menu.c:
* src/minibuf.c:
* src/msdos.c:
* src/nsfns.m:
* src/nsmenu.m:
* src/nsselect.m:
* src/print.c:
* src/process.c:
* src/search.c:
* src/sound.c:
* src/syntax.c:
* src/term.c:
* src/terminal.c:
* src/textprop.c:
* src/undo.c:
* src/w16select.c:
* src/w32console.c:
* src/w32fns.c:
* src/w32font.c:
* src/w32menu.c:
* src/w32proc.c:
* src/w32select.c:
* src/window.c:
* src/xdisp.c:
* src/xfaces.c:
* src/xfns.c:
* src/xmenu.c:
* src/xselect.c:
* src/xsettings.c:
* src/xsmfns.c: Likewise.
Diffstat (limited to 'src/syntax.c')
| -rw-r--r-- | src/syntax.c | 57 |
1 files changed, 20 insertions, 37 deletions
diff --git a/src/syntax.c b/src/syntax.c index 7f3557f8441..3857f15cd10 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -721,8 +721,7 @@ back_comment (EMACS_INT from, EMACS_INT from_byte, EMACS_INT stop, int comnested | |||
| 721 | DEFUN ("syntax-table-p", Fsyntax_table_p, Ssyntax_table_p, 1, 1, 0, | 721 | DEFUN ("syntax-table-p", Fsyntax_table_p, Ssyntax_table_p, 1, 1, 0, |
| 722 | doc: /* Return t if OBJECT is a syntax table. | 722 | doc: /* Return t if OBJECT is a syntax table. |
| 723 | Currently, any char-table counts as a syntax table. */) | 723 | Currently, any char-table counts as a syntax table. */) |
| 724 | (object) | 724 | (Lisp_Object object) |
| 725 | Lisp_Object object; | ||
| 726 | { | 725 | { |
| 727 | if (CHAR_TABLE_P (object) | 726 | if (CHAR_TABLE_P (object) |
| 728 | && EQ (XCHAR_TABLE (object)->purpose, Qsyntax_table)) | 727 | && EQ (XCHAR_TABLE (object)->purpose, Qsyntax_table)) |
| @@ -740,7 +739,7 @@ check_syntax_table (Lisp_Object obj) | |||
| 740 | DEFUN ("syntax-table", Fsyntax_table, Ssyntax_table, 0, 0, 0, | 739 | DEFUN ("syntax-table", Fsyntax_table, Ssyntax_table, 0, 0, 0, |
| 741 | doc: /* Return the current syntax table. | 740 | doc: /* Return the current syntax table. |
| 742 | This is the one specified by the current buffer. */) | 741 | This is the one specified by the current buffer. */) |
| 743 | () | 742 | (void) |
| 744 | { | 743 | { |
| 745 | return current_buffer->syntax_table; | 744 | return current_buffer->syntax_table; |
| 746 | } | 745 | } |
| @@ -749,7 +748,7 @@ DEFUN ("standard-syntax-table", Fstandard_syntax_table, | |||
| 749 | Sstandard_syntax_table, 0, 0, 0, | 748 | Sstandard_syntax_table, 0, 0, 0, |
| 750 | doc: /* Return the standard syntax table. | 749 | doc: /* Return the standard syntax table. |
| 751 | This is the one used for new buffers. */) | 750 | This is the one used for new buffers. */) |
| 752 | () | 751 | (void) |
| 753 | { | 752 | { |
| 754 | return Vstandard_syntax_table; | 753 | return Vstandard_syntax_table; |
| 755 | } | 754 | } |
| @@ -757,8 +756,7 @@ This is the one used for new buffers. */) | |||
| 757 | DEFUN ("copy-syntax-table", Fcopy_syntax_table, Scopy_syntax_table, 0, 1, 0, | 756 | DEFUN ("copy-syntax-table", Fcopy_syntax_table, Scopy_syntax_table, 0, 1, 0, |
| 758 | doc: /* Construct a new syntax table and return it. | 757 | doc: /* Construct a new syntax table and return it. |
| 759 | It is a copy of the TABLE, which defaults to the standard syntax table. */) | 758 | It is a copy of the TABLE, which defaults to the standard syntax table. */) |
| 760 | (table) | 759 | (Lisp_Object table) |
| 761 | Lisp_Object table; | ||
| 762 | { | 760 | { |
| 763 | Lisp_Object copy; | 761 | Lisp_Object copy; |
| 764 | 762 | ||
| @@ -784,8 +782,7 @@ It is a copy of the TABLE, which defaults to the standard syntax table. */) | |||
| 784 | DEFUN ("set-syntax-table", Fset_syntax_table, Sset_syntax_table, 1, 1, 0, | 782 | DEFUN ("set-syntax-table", Fset_syntax_table, Sset_syntax_table, 1, 1, 0, |
| 785 | doc: /* Select a new syntax table for the current buffer. | 783 | doc: /* Select a new syntax table for the current buffer. |
| 786 | One argument, a syntax table. */) | 784 | One argument, a syntax table. */) |
| 787 | (table) | 785 | (Lisp_Object table) |
| 788 | Lisp_Object table; | ||
| 789 | { | 786 | { |
| 790 | int idx; | 787 | int idx; |
| 791 | check_syntax_table (table); | 788 | check_syntax_table (table); |
| @@ -844,8 +841,7 @@ For example, if CHARACTER is a word constituent, the | |||
| 844 | character `w' (119) is returned. | 841 | character `w' (119) is returned. |
| 845 | The characters that correspond to various syntax codes | 842 | The characters that correspond to various syntax codes |
| 846 | are listed in the documentation of `modify-syntax-entry'. */) | 843 | are listed in the documentation of `modify-syntax-entry'. */) |
| 847 | (character) | 844 | (Lisp_Object character) |
| 848 | Lisp_Object character; | ||
| 849 | { | 845 | { |
| 850 | int char_int; | 846 | int char_int; |
| 851 | CHECK_CHARACTER (character); | 847 | CHECK_CHARACTER (character); |
| @@ -856,8 +852,7 @@ are listed in the documentation of `modify-syntax-entry'. */) | |||
| 856 | 852 | ||
| 857 | DEFUN ("matching-paren", Fmatching_paren, Smatching_paren, 1, 1, 0, | 853 | DEFUN ("matching-paren", Fmatching_paren, Smatching_paren, 1, 1, 0, |
| 858 | doc: /* Return the matching parenthesis of CHARACTER, or nil if none. */) | 854 | doc: /* Return the matching parenthesis of CHARACTER, or nil if none. */) |
| 859 | (character) | 855 | (Lisp_Object character) |
| 860 | Lisp_Object character; | ||
| 861 | { | 856 | { |
| 862 | int char_int, code; | 857 | int char_int, code; |
| 863 | CHECK_NUMBER (character); | 858 | CHECK_NUMBER (character); |
| @@ -875,8 +870,7 @@ STRING should be a string as it is allowed as argument of | |||
| 875 | `modify-syntax-entry'. Value is the equivalent cons cell | 870 | `modify-syntax-entry'. Value is the equivalent cons cell |
| 876 | \(CODE . MATCHING-CHAR) that can be used as value of a `syntax-table' | 871 | \(CODE . MATCHING-CHAR) that can be used as value of a `syntax-table' |
| 877 | text property. */) | 872 | text property. */) |
| 878 | (string) | 873 | (Lisp_Object string) |
| 879 | Lisp_Object string; | ||
| 880 | { | 874 | { |
| 881 | register const unsigned char *p; | 875 | register const unsigned char *p; |
| 882 | register enum syntaxcode code; | 876 | register enum syntaxcode code; |
| @@ -987,8 +981,7 @@ this flag: | |||
| 987 | such characters are treated as whitespace when they occur | 981 | such characters are treated as whitespace when they occur |
| 988 | between expressions. | 982 | between expressions. |
| 989 | usage: (modify-syntax-entry CHAR NEWENTRY &optional SYNTAX-TABLE) */) | 983 | usage: (modify-syntax-entry CHAR NEWENTRY &optional SYNTAX-TABLE) */) |
| 990 | (c, newentry, syntax_table) | 984 | (Lisp_Object c, Lisp_Object newentry, Lisp_Object syntax_table) |
| 991 | Lisp_Object c, newentry, syntax_table; | ||
| 992 | { | 985 | { |
| 993 | if (CONSP (c)) | 986 | if (CONSP (c)) |
| 994 | { | 987 | { |
| @@ -1021,8 +1014,7 @@ usage: (modify-syntax-entry CHAR NEWENTRY &optional SYNTAX-TABLE) */) | |||
| 1021 | DEFUN ("internal-describe-syntax-value", Finternal_describe_syntax_value, | 1014 | DEFUN ("internal-describe-syntax-value", Finternal_describe_syntax_value, |
| 1022 | Sinternal_describe_syntax_value, 1, 1, 0, | 1015 | Sinternal_describe_syntax_value, 1, 1, 0, |
| 1023 | doc: /* Insert a description of the internal syntax description SYNTAX at point. */) | 1016 | doc: /* Insert a description of the internal syntax description SYNTAX at point. */) |
| 1024 | (syntax) | 1017 | (Lisp_Object syntax) |
| 1025 | Lisp_Object syntax; | ||
| 1026 | { | 1018 | { |
| 1027 | register enum syntaxcode code; | 1019 | register enum syntaxcode code; |
| 1028 | char desc, start1, start2, end1, end2, prefix, comstyle, comnested; | 1020 | char desc, start1, start2, end1, end2, prefix, comstyle, comnested; |
| @@ -1307,8 +1299,7 @@ Normally returns t. | |||
| 1307 | If an edge of the buffer or a field boundary is reached, point is left there | 1299 | If an edge of the buffer or a field boundary is reached, point is left there |
| 1308 | and the function returns nil. Field boundaries are not noticed if | 1300 | and the function returns nil. Field boundaries are not noticed if |
| 1309 | `inhibit-field-text-motion' is non-nil. */) | 1301 | `inhibit-field-text-motion' is non-nil. */) |
| 1310 | (arg) | 1302 | (Lisp_Object arg) |
| 1311 | Lisp_Object arg; | ||
| 1312 | { | 1303 | { |
| 1313 | Lisp_Object tmp; | 1304 | Lisp_Object tmp; |
| 1314 | int orig_val, val; | 1305 | int orig_val, val; |
| @@ -1343,8 +1334,7 @@ With arg "^a-zA-Z", skips nonletters stopping before first letter. | |||
| 1343 | Char classes, e.g. `[:alpha:]', are supported. | 1334 | Char classes, e.g. `[:alpha:]', are supported. |
| 1344 | 1335 | ||
| 1345 | Returns the distance traveled, either zero or positive. */) | 1336 | Returns the distance traveled, either zero or positive. */) |
| 1346 | (string, lim) | 1337 | (Lisp_Object string, Lisp_Object lim) |
| 1347 | Lisp_Object string, lim; | ||
| 1348 | { | 1338 | { |
| 1349 | return skip_chars (1, string, lim, 1); | 1339 | return skip_chars (1, string, lim, 1); |
| 1350 | } | 1340 | } |
| @@ -1353,8 +1343,7 @@ DEFUN ("skip-chars-backward", Fskip_chars_backward, Sskip_chars_backward, 1, 2, | |||
| 1353 | doc: /* Move point backward, stopping after a char not in STRING, or at pos LIM. | 1343 | doc: /* Move point backward, stopping after a char not in STRING, or at pos LIM. |
| 1354 | See `skip-chars-forward' for details. | 1344 | See `skip-chars-forward' for details. |
| 1355 | Returns the distance traveled, either zero or negative. */) | 1345 | Returns the distance traveled, either zero or negative. */) |
| 1356 | (string, lim) | 1346 | (Lisp_Object string, Lisp_Object lim) |
| 1357 | Lisp_Object string, lim; | ||
| 1358 | { | 1347 | { |
| 1359 | return skip_chars (0, string, lim, 1); | 1348 | return skip_chars (0, string, lim, 1); |
| 1360 | } | 1349 | } |
| @@ -1365,8 +1354,7 @@ SYNTAX is a string of syntax code characters. | |||
| 1365 | Stop before a char whose syntax is not in SYNTAX, or at position LIM. | 1354 | Stop before a char whose syntax is not in SYNTAX, or at position LIM. |
| 1366 | If SYNTAX starts with ^, skip characters whose syntax is NOT in SYNTAX. | 1355 | If SYNTAX starts with ^, skip characters whose syntax is NOT in SYNTAX. |
| 1367 | This function returns the distance traveled, either zero or positive. */) | 1356 | This function returns the distance traveled, either zero or positive. */) |
| 1368 | (syntax, lim) | 1357 | (Lisp_Object syntax, Lisp_Object lim) |
| 1369 | Lisp_Object syntax, lim; | ||
| 1370 | { | 1358 | { |
| 1371 | return skip_syntaxes (1, syntax, lim); | 1359 | return skip_syntaxes (1, syntax, lim); |
| 1372 | } | 1360 | } |
| @@ -1377,8 +1365,7 @@ SYNTAX is a string of syntax code characters. | |||
| 1377 | Stop on reaching a char whose syntax is not in SYNTAX, or at position LIM. | 1365 | Stop on reaching a char whose syntax is not in SYNTAX, or at position LIM. |
| 1378 | If SYNTAX starts with ^, skip characters whose syntax is NOT in SYNTAX. | 1366 | If SYNTAX starts with ^, skip characters whose syntax is NOT in SYNTAX. |
| 1379 | This function returns the distance traveled, either zero or negative. */) | 1367 | This function returns the distance traveled, either zero or negative. */) |
| 1380 | (syntax, lim) | 1368 | (Lisp_Object syntax, Lisp_Object lim) |
| 1381 | Lisp_Object syntax, lim; | ||
| 1382 | { | 1369 | { |
| 1383 | return skip_syntaxes (0, syntax, lim); | 1370 | return skip_syntaxes (0, syntax, lim); |
| 1384 | } | 1371 | } |
| @@ -2193,8 +2180,7 @@ Stop scanning if we find something other than a comment or whitespace. | |||
| 2193 | Set point to where scanning stops. | 2180 | Set point to where scanning stops. |
| 2194 | If COUNT comments are found as expected, with nothing except whitespace | 2181 | If COUNT comments are found as expected, with nothing except whitespace |
| 2195 | between them, return t; otherwise return nil. */) | 2182 | between them, return t; otherwise return nil. */) |
| 2196 | (count) | 2183 | (Lisp_Object count) |
| 2197 | Lisp_Object count; | ||
| 2198 | { | 2184 | { |
| 2199 | register EMACS_INT from; | 2185 | register EMACS_INT from; |
| 2200 | EMACS_INT from_byte; | 2186 | EMACS_INT from_byte; |
| @@ -2797,8 +2783,7 @@ Comments are ignored if `parse-sexp-ignore-comments' is non-nil. | |||
| 2797 | If the beginning or end of (the accessible part of) the buffer is reached | 2783 | If the beginning or end of (the accessible part of) the buffer is reached |
| 2798 | and the depth is wrong, an error is signaled. | 2784 | and the depth is wrong, an error is signaled. |
| 2799 | If the depth is right but the count is not used up, nil is returned. */) | 2785 | If the depth is right but the count is not used up, nil is returned. */) |
| 2800 | (from, count, depth) | 2786 | (Lisp_Object from, Lisp_Object count, Lisp_Object depth) |
| 2801 | Lisp_Object from, count, depth; | ||
| 2802 | { | 2787 | { |
| 2803 | CHECK_NUMBER (from); | 2788 | CHECK_NUMBER (from); |
| 2804 | CHECK_NUMBER (count); | 2789 | CHECK_NUMBER (count); |
| @@ -2818,8 +2803,7 @@ If the beginning or end of (the accessible part of) the buffer is reached | |||
| 2818 | in the middle of a parenthetical grouping, an error is signaled. | 2803 | in the middle of a parenthetical grouping, an error is signaled. |
| 2819 | If the beginning or end is reached between groupings | 2804 | If the beginning or end is reached between groupings |
| 2820 | but before count is used up, nil is returned. */) | 2805 | but before count is used up, nil is returned. */) |
| 2821 | (from, count) | 2806 | (Lisp_Object from, Lisp_Object count) |
| 2822 | Lisp_Object from, count; | ||
| 2823 | { | 2807 | { |
| 2824 | CHECK_NUMBER (from); | 2808 | CHECK_NUMBER (from); |
| 2825 | CHECK_NUMBER (count); | 2809 | CHECK_NUMBER (count); |
| @@ -2831,7 +2815,7 @@ DEFUN ("backward-prefix-chars", Fbackward_prefix_chars, Sbackward_prefix_chars, | |||
| 2831 | 0, 0, 0, | 2815 | 0, 0, 0, |
| 2832 | doc: /* Move point backward over any number of chars with prefix syntax. | 2816 | doc: /* Move point backward over any number of chars with prefix syntax. |
| 2833 | This includes chars with "quote" or "prefix" syntax (' or p). */) | 2817 | This includes chars with "quote" or "prefix" syntax (' or p). */) |
| 2834 | () | 2818 | (void) |
| 2835 | { | 2819 | { |
| 2836 | int beg = BEGV; | 2820 | int beg = BEGV; |
| 2837 | int opoint = PT; | 2821 | int opoint = PT; |
| @@ -3255,8 +3239,7 @@ Fifth arg OLDSTATE is a list like what this function returns. | |||
| 3255 | Sixth arg COMMENTSTOP non-nil means stop at the start of a comment. | 3239 | Sixth arg COMMENTSTOP non-nil means stop at the start of a comment. |
| 3256 | If it is symbol `syntax-table', stop after the start of a comment or a | 3240 | If it is symbol `syntax-table', stop after the start of a comment or a |
| 3257 | string, or after end of a comment or a string. */) | 3241 | string, or after end of a comment or a string. */) |
| 3258 | (from, to, targetdepth, stopbefore, oldstate, commentstop) | 3242 | (Lisp_Object from, Lisp_Object to, Lisp_Object targetdepth, Lisp_Object stopbefore, Lisp_Object oldstate, Lisp_Object commentstop) |
| 3259 | Lisp_Object from, to, targetdepth, stopbefore, oldstate, commentstop; | ||
| 3260 | { | 3243 | { |
| 3261 | struct lisp_parse_state state; | 3244 | struct lisp_parse_state state; |
| 3262 | int target; | 3245 | int target; |