1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 08:11:05 -08:00
Commit graph

99 commits

Author SHA1 Message Date
Karl Heuer
da71ab916b (Fforward_comment): Set comstyle for Scomment_fence. 1999-08-16 20:34:56 +00:00
Dave Love
0beaf54f1d (Fparse_partial_sexp): Correct test for element 8 to be
non-nil.
1999-05-14 09:51:02 +00:00
Karl Heuer
ccf89641df (scan_sexps_forward): Delete duplicate code
to set prev_from_syntax, above start of main loop.
At startinstring, check syntax when checking for a match.
1999-01-22 21:57:43 +00:00
Richard M. Stallman
f3be100fc2 (syms_of_syntax): Fix the setup of Qscan_error. 1998-10-20 20:56:18 +00:00
Richard M. Stallman
c3907a7e36 (scan_lists): Bring FROM back into range BEGV...ZV. 1998-10-08 10:47:51 +00:00
Richard M. Stallman
326b283b18 (scan_sexps_forward): Set up the syntax table scanning
stuff before jumping into the loop.
1998-08-10 21:19:03 +00:00
Kenichi Handa
7c19e8e146 (Fmodify_syntax_entry): Use macro STRING_BYTES to get
byte size of a string.
1998-06-23 00:29:51 +00:00
Richard M. Stallman
1674d9a28b (skip_chars): Don't examine STRING before verifying that it is a string.
(scan_lists): Use prev_char_comend_first, not ...comstart...
1998-06-14 19:04:01 +00:00
Richard M. Stallman
89c6809aa9 (Fforward_comment): Properly compute BYTEPOS arg to char_quoted. 1998-06-11 02:33:06 +00:00
Richard M. Stallman
1a102a5863 (struct lisp_parse_state): New field, levelstarts.
(scan_sexps_forward): Use 10th elt of STATE to set levelstarts.
(parse-partial-sexp): Add 10th elt to return value.
1998-06-08 04:29:46 +00:00
Richard M. Stallman
f902a00832 (scan_lists): Properly skip the comment-fence character
that ends a comment, when moving forward.
(Fbackward_prefix_chars): Return immediately if point is at BEGV.

(prev_char_comend_first): New function.
(back_comment): Use that.  Carefully update syntax table position
for each character that is fetched.
(Fforward_comment): Likewise.
(scan_lists): Likewise.
(prev_char_comstart_first): New function.
1998-06-06 20:20:13 +00:00
Kenichi Handa
130901129f (skip_chars): Fix previous change. 1998-05-18 04:53:37 +00:00
Kenichi Handa
06274af57f (skip_chars): Fix bug in handling a range which
contains multibyte characters.
1998-05-18 00:59:38 +00:00
Richard M. Stallman
74cf0beb86 (skip_chars): When fetching char after \,
don't fail to set c_leading_code.
1998-05-13 06:47:15 +00:00
Richard M. Stallman
7c7ca3d217 (scan_lists, scan_sexps_forward): Move complex expressions
outside of the switch statement.
1998-05-09 07:39:00 +00:00
Andreas Schwab
dfcf069d56 Fix -Wimplicit warnings. 1998-04-14 12:25:56 +00:00
Richard M. Stallman
1fd3172dd4 (Fbackward_prefix_chars): Set point properly while scanning.
(scan_sexps_forward): Make INC_FROM do UPDATE_SYNTAX_TABLE_FORWARD.
Delete the explicit calls to UPDATE_SYNTAX_TABLE_FORWARD.
Also set prev_from_syntax (new local var).  Test that in the loop,
instead of fetching syntax of the previous char.
1998-03-18 00:11:33 +00:00
Richard M. Stallman
d80f4cc71c (update_syntax_table): Properly update `position' field of used intervals. 1998-03-02 02:40:53 +00:00
Karl Heuer
ee0cdb4862 (update_syntax_table): Fix calculations using offset.
(skip_chars): Fix loop termination condition.
1998-02-22 01:04:11 +00:00
Richard M. Stallman
ef316cf013 (skip_chars): Use INC_POS instead of INC_BOTH.
(Fforward_comment): Always use both FROM and FROM_BYTE to set point.
Use dec_bytepos not DEC_POS.
(scan_lists): Handle unibyte buffers when decrementing temp_pos.
(INC_FROM): Use INC_BOTH.
(inc_bytepos, dec_bytepos): In unibyte mode, just increment bytepos.
1998-02-16 03:02:53 +00:00
Richard M. Stallman
eb35b62861 (back_comment): Move the find_defun_start call
out of the scan_sexps_forward call.
No need to call find_defun_start
if we found the defun start in the initial scan.
1998-01-25 01:55:51 +00:00
Richard M. Stallman
b29ff19427 (skip_chars): Use unibyte_char_to_multibyte, 1998-01-21 22:02:05 +00:00
Karl Heuer
9828a47734 (skip_chars): Fix test for end of string, looking for `-'.
(back_comment): Don't allow quoting a comment-end.
(scan_lists): Likewise.
1998-01-18 05:15:48 +00:00
Richard M. Stallman
4101e6fea4 (skip_chars): Handle multibyte and unibyte strings
for either kind of buffer.  Scan string by bytes and chars.
1998-01-09 23:17:52 +00:00
Richard M. Stallman
6a140a74ab (scan_sexps_forward): Additional arg FROM_BYTE. Calls changed.
(find_defun_start): Additional arg POS_BYTE.
Save final byte pos in find_start_value_byte.
(find_start_value_byte): New variable.

(Fforward_comment): Scan by bytes and chars.
(Fbackward_prefix_chars): Scan by bytes and chars.
(scan_words, scan_sexps_forward): Scan bytes as well as chars.
(skip_chars, scan_lists): Scan by bytes and chars.  Now static.

(char_quoted): Take charpos and bytepos as args.
(back_comment): Likewise.
(update_syntax_table): Arg renamed.
(inc_bytepos, dec_bytepos): New functions.
1998-01-01 06:31:54 +00:00
Richard M. Stallman
bff37d2a0c (Fparse_partial_sexp): Return nil for 9th element
whenever not inside a string or a comment.
1997-12-21 01:57:32 +00:00
Richard M. Stallman
644ea4df73 Comment and whitespace changes. 1997-12-21 01:34:37 +00:00
Karl Heuer
527a32d98e (back_comment): Handle 2-char comment starts
when reaching the first of the pair.
1997-11-23 02:18:34 +00:00
Karl Heuer
5df4982e74 (skip_chars): Check type of `string' before using it. 1997-11-20 22:03:42 +00:00
Richard M. Stallman
b9145dbb57 (Fforward_comment): When count1 is negative, return nil if FROM reaches STOP. 1997-07-24 07:40:26 +00:00
Richard M. Stallman
44d8a79389 (init_syntax_once): Convert Fmake_vector argument to Lisp_Integer. 1997-07-12 06:38:27 +00:00
Richard M. Stallman
2e34157cd9 Fix bugs with inappropriate mixing of Lisp_Object with int. 1997-07-04 20:44:52 +00:00
Richard M. Stallman
4c92063301 (scan_sexps_forward): Split up a complex if-test. 1997-06-29 00:33:39 +00:00
Richard M. Stallman
e704cb4bc6 (Fsyntax_table_p, check_syntax_table): Use EQ.
(Fmodify_syntax_entry): Use XINT to access c.
(describe_syntax): Use XINT to access first.
1997-06-02 02:21:48 +00:00
Richard M. Stallman
ae03af3444 (Fforward_comment): Handle unmatched two-character comment starters. 1997-05-31 18:30:56 +00:00
Richard M. Stallman
ea315ed6e4 (back_comment): Detect 2-char comment starts properly.
New arg COMSTYLE; callers changed.
1997-05-31 18:16:22 +00:00
Richard M. Stallman
e41819d480 (describe_syntax_1): Pass new args to describe_vector. 1997-05-13 19:36:15 +00:00
Richard M. Stallman
4c8535eb4d (skip_chars): Fix previous change in syntax/backward case. 1997-04-28 00:49:41 +00:00
Richard M. Stallman
7e68b0eaf3 (skip_chars): Merge mule changes back in. 1997-04-25 21:59:44 +00:00
Richard M. Stallman
b745025d2d Update copyright year. 1997-04-15 04:56:39 +00:00
Richard M. Stallman
195d13612d (SYNTAX_ENTRY_VIA_PROPERTY): Set to take `syntax-table'
text property into account when doing SYNTAX (c).
(ST_COMMENT_STYLE, ST_STRING_STYLE): New codes to denote
delimiters for new types of strings and comments.
(Vparse_sexp_lookup_properties): New variable.
(struct lisp_parse_state): Comment updated.
(gl_state): New global variable.
(update_syntax_table): New function.
(char_quoted): Move earlier, update gl_state when needed.
(find_defun_start): Update gl_state when needed.
(back_comment): New function.
(Scomment_fence, Sstring_fence): New delimeter char classes
denoted by `!' and `|'.
(Fchar_syntax, Fmatching_paren): Update gl_state to whole-bufferstate.
(scan_words): update gl_state when needed.
(Fskip_chars_forward): Move from search.c.
(Fskip_chars_backward): Move from search.c.
(Fskip_syntax_forward): Move from search.c.
(Fskip_syntax_backward): Move from search.c.
(skip_chars): Move from search.c.
(Fforward_comment, scan_lists): Update gl_state when needed.
Handle Scomment_fence, Sstring_fence.
(Fbackward_prefix_chars) Update gl_state when needed.
(scan_sexps_forward): Update gl_state when needed.
Handle Scomment_fence, Sstring_fence.  If comment_stop==-1, stop at start
or end of comment or string.
(Fparse-partial-sexp): Doc fix.
(syms_of_syntax): Move initialization of skip* from search.c.
1997-04-15 04:53:58 +00:00
Kenichi Handa
78f9a1f703 (init_syntax_once): Add trick to avoid compiler warning
of "comparison is always 1 ...".
1997-02-28 01:38:57 +00:00
Kenichi Handa
908b7fea57 (describe_syntax): Handle the case that the argument
VALUE is char-table.
1997-02-27 07:47:24 +00:00
Karl Heuer
93da5fff9b Include charset.h and category.h.
(Vsyntax_code_object): New variable.
(Fmodify_syntax_entry): Handle multibyte characters.  A multibyte
character in matching parenthesis is also handled correctly.  Use
shared object in the vector Vsyntax_code_object for an ASCII
character.
(describe_syntax): Handle a multibyte character in matching
parenthesis.
(describe_syntax_1): Describe also parent syntax tables.
(scan_words, Fforward_comment): Handle multibyte characters.
(scan_lists, char_quoted, Fbackward_prefix_chars): Likewise.
(scan_sexps_forward): Likewise.
(init_syntax_once): Initialize Vsyntax_code_object.
Initialize Vstandard_syntax_table by share objects in
Vsyntax_code_object.
(syms_of_syntax): Staticpro Vsyntax_code_object.
1997-02-20 06:56:29 +00:00
Richard M. Stallman
7bf5e9e404 (scan_lists): Signal errors using scan-error.
(syms_of_syntax): Set up Qscan_error.
1997-02-10 09:47:12 +00:00
Karl Heuer
6ec8bbd20d Change all references from point to PT. 1996-09-01 19:15:05 +00:00
Richard M. Stallman
0f86732408 (Fcopy_syntax_table): Set default to nil.
Set the parent only if it was nil.
1996-02-24 20:03:07 +00:00
Erik Naggum
3b7ad313e0 Update FSF's address in the preamble. 1996-01-15 09:18:04 +00:00
Erik Naggum
2203e1e8b7 (Fsyntax_table_p, Fchar_syntax, Fmatching_paren, Fmodify_syntax_entry):
Harmonize arguments with documentation.
1996-01-09 00:33:54 +00:00
Richard M. Stallman
d1be9f0f0d (check_syntax_table): Check the purpose slot.
Use Qsyntax_table_p for the error message.

(Fmodify_syntax_entry): Don't fail to init MATCH.
1995-11-11 20:28:26 +00:00