summaryrefslogtreecommitdiff
path: root/src/syntax.c
Commit message (Collapse)AuthorAgeFilesLines
* Include keymap.h.Stefan Monnier2001-10-101-0/+1
|
* Comment change.Richard M. Stallman2001-09-081-3/+9
|
* Fixed a typo in a comment.Eli Zaretskii2001-06-151-1/+1
|
* (update_syntax_table): Check that oldi has the sameStefan Monnier2001-05-011-7/+7
| | | | properties as old_prop before deciding not to invalidate.
* (scan_lists): Check that the right quote char has theStefan Monnier2000-12-091-4/+6
| | | | | right Sstring syntax when jumping over strings. (init_syntax_once): Use Smax rather than 13.
* *** empty log message ***Kenichi Handa2000-10-241-6/+6
|
* (describe_syntax): Add code for comment and string fences.Stefan Monnier2000-10-151-1/+7
|
* (Fstring_to_syntax): New function extracted from Fmodify_syntax_entry.Stefan Monnier2000-10-151-69/+77
| | | | | | (Fmodify_syntax_entry): Use it and document the ! and | fences. (skip_chars, Fforward_comment): Remove unused variables. (syms_of_syntax): Add defsubr for string-to-syntax.
* Fix wording in a comment.Eli Zaretskii2000-10-151-6/+6
|
* (skip_chars): Change the way of handling a range from unibyte char toKenichi Handa2000-10-121-6/+7
| | | | multibyte char.
* (prev_char_comstart_first): Remove.Stefan Monnier2000-10-021-38/+77
| | | | | | (back_comment): Check two-char comment markers more carefully to better handle overlapping cases like *//* or /* */* */ ... Match nestedness of ender/starter.
* (forw_comment): Match nestedness of ender/starter.Stefan Monnier2000-10-021-26/+30
| | | | (Fforward_comment): Treat an unmatched \n comment-ender as whitespace.
* (skip_chars): Handle negation correctly.Kenichi Handa2000-09-281-49/+30
|
* (back_comment): Detect cases where a comment-starter isStefan Monnier2000-08-271-16/+27
| | | | | actually inside another comment as in: /* a // b */ c // d \n. Make it clear that `comstart_pos' is unused for nested comments.
* * syntax.c (skip_chars): Fix previous change. Make the handling ofKenichi Handa2000-08-071-54/+50
| | | | unibyte string consistent with that of regex search.
* (skip_chars): Fix handling of multibyte<->unibyte conversion.Kenichi Handa2000-08-051-17/+35
|
* (skip_chars): Fix typo in error message.Gerd Moellmann2000-08-041-2/+2
|
* (Fforward_word): Add last arg nil in call ofGerd Moellmann2000-07-251-1/+1
| | | | Fconstrain_to_field.
* (back_comment): Add null default in switch for pcc.Dave Love2000-07-141-0/+1
|
* (back_comment): Use one switch rather than a few `if's.Stefan Monnier2000-07-121-40/+51
| | | | | | | | | Obey open_paren_in_column_0_is_defun_start. When reverting to the `slow' method, try to nicely handle the case of nested comments by checking that the comment-starter we found does indeed match the comment-ender. (scan_sexps_forward, scan_sexps_forward): Ignore excessive opening parenthesis rather than throwing an error.
* (back_comment): Simplify string-parity counting (withStefan Monnier2000-06-211-31/+32
| | | | | | | the added benefit of handling multiple string-styles as long as they are not nested). Jump to the slow code as soon as a comment starter is found in a "string_lossage" position. Fixes the case: " /* " /* " */.
* (scan_sexps_forward):Stefan Monnier2000-06-201-13/+5
| | | | | Check the comstyle of single-char comment-starters. Clarify control-flow around the Scomment case.
* (describe_syntax): Recognize the `n'estable bit.Stefan Monnier2000-06-201-5/+15
| | | | | | | (Fforward_comment, scan_lists): Check the comstyle of single-char comment-starters. (scan_sexps_forward): Don't try to recognize `half comment-enders' if we're just at the beginning of the comment (f.ex with (*) ... (*)).
* (Fparse_partial_sexp): Doc fix.Dave Love2000-06-191-3/+3
|
* (find_defun_start): Move test forGerd Moellmann2000-05-291-13/+15
| | | | open_paren_in_column_0_is_defun_start outside of the loop.
* (skip_chars): Use FETCH_STRING_CHAR_ADVANCE unconditionally.Kenichi Handa2000-05-231-22/+6
|
* Use new macro namesGerd Moellmann2000-03-271-2/+2
| | | | for handling per-buffer variables.
* (Fset_syntax_table): Use new macros for per-bufferGerd Moellmann2000-03-261-2/+3
| | | | variables.
* (open_paren_in_column_0_is_defun_start): New variable.Gerd Moellmann2000-03-241-2/+15
| | | | | | (find_defun_start): Consider an open parenthesis in column 0 a defun start only if open_paren_in_column_0_is_defun_start is set. (syms_of_syntax): New variable open-paren-in-column-0-is-defun-start.
* Changes towards better type safety regarding intervals, primarilyKen Raeburn2000-03-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | regarding the "parent" handle. These just separate out the different usages based on the type of parent (interval vs lisp object); later changes will do type checking and enforcement. * intervals.h (NULL_INTERVAL): Cast to INTERVAL type. (INT_LISPLIKE): New macro. (NULL_INTERVAL_P): Use it. (INTERVAL_HAS_PARENT, INTERVAL_HAS_OBJECT, SET_INTERVAL_PARENT, SET_INTERVAL_OBJECT, INTERVAL_PARENT, COPY_INTERVAL_PARENT, GET_INTERVAL_OBJECT, INTERVAL_PARENT_OR_NULL): New macros. * alloc.c (make_interval, gc_sweep): Use new macros; eliminate all explicit references to "parent" field of struct interval and associated unclean type conversions. * intervals.c (create_root_interval, root_interval, rotate_right, rotate_left, balance_possible_root_interval, split_interval_right, split_interval_left, interval_start_pos, find_interval, next_interval, previous_interval, update_interval, adjust_intervals_for_insertion, delete_node, delete_interval, adjust_intervals_for_deletion, merge_interval_right, merge_interval_left, reproduce_tree, graft_intervals_into_buffer, copy_intervals_to_string): Likewise. * intervals.h (AM_LEFT_CHILD, AM_RIGHT_CHILD, RESET_INTERVAL): Likewise. * syntax.c (update_syntax_table): Likewise. * intervals.c (reproduce_tree_obj): New function, like reproduce_tree but takes a Lisp_Object for the parent. Declare with prototype. (graft_intervals_into_buffer): Use it when appropriate. (reproduce_tree): Declare with prototype. (balance_possible_root_interval): Check that the parent is a lisp object before trying to examine its type.
* (multibyte_syntax_as_symbol): New variable.Kenichi Handa2000-02-231-9/+32
| | | | | | | | | (syms_of_syntax): Declare it as a Lisp variable. (SYNTAX_WITH_MULTIBYTE_CHECK): New macro. (scan_lists): If both sexpflag and multibyte_syntax_as_symbol are nonzero, treat all multibyte characters as symbol. (init_syntax_once): Give syntax `word' to all mutlbiyte characters.
* (Fforward_comment): Undo the previous change, since cc-modeStefan Monnier2000-02-171-3/+7
| | | | depends on the previous behavior.
* (back_comment): Make sure we only consider comment-startersStefan Monnier2000-02-151-6/+23
| | | | | | | | of the relevant style and return -1 in case of a failure to find the beginning of the comment. (Fforward_comment): If back_comment fails, go back to the position just after the comment-end. (scan_lists): Add comment describing a very minor bug.
* (Fforward_word): Undo previous change.Gerd Moellmann2000-01-011-4/+3
|
* (Fforward_word): Notice field boundaries only ifGerd Moellmann2000-01-011-4/+6
| | | | inhibit-field-text-motion is nil.
* * callproc.c (strerror): Remove decl.Paul Eggert1999-11-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fileio.c (strerror): Likewise. * process.c (strerror): Likewise. * emacs.c (strerror): Likewise. (Vsystem_messages_locale): Renamed from Vmessages_locale. All uses changed. (Vprevious_system_messages_locale): Likewise, from Vprevious_messages_locale. (Vsystem_time_locale): Likewise, from Vtime_locale. (Vprevious_system_time_locale): Likewise, from Vprevious_time_locale. (ABORT_RETURN_TYPE): New macro. (abort): Return type is now ABORT_RETURN_TYPE. (main): Always invoke init_signals, even if POSIX_SIGNALS is not defined. (syms_of_emacs): messages-locale -> system-messages-locale, previous-messages-locale -> previous-system-messages-locale, time-locale -> system-time-locale, previous-time-locale -> previous-system-time-locale. * gmalloc.c (PP, __ptr_t): Assume ANSI C if STDC_HEADERS is defined. (const): Do not define; that's config.h's job. (<limits.h>): Include if HAVE_LIMITS_H is defined. (CHAR_BIT): Move test for definedness outside of limits.h condition. (<stddef.h>): Include if STDC_HEADERS is defined. (FREE_RETURN_TYPE): New macro. (free): Return type is now FREE_RETURN_TYPE. * lisp.h (synchronize_system_time_locale): Renamed from synchronize_time_locale. All uses changed. (synchronize_system_messages_locale): Likewise, from synchronize_messages_locale. * process.c (sys_siglist): Remove. * syntax.c (scan_sexps_forward): Use abort, not assert. * sysdep.c (my_sys_siglist): New var. (sys_siglist): New macro. Remove old initialized vars of same name. (init_signals): Initialize sys_siglist. * xfns.c (abort): Remove decl; stdlib.h now does this.
* (Fforward_word): Handle fields even if would have hitRichard M. Stallman1999-11-091-9/+7
| | | | an edge of the buffer. Return nil if affected by fields.
* Remove whitespace after open or in front of closing parentheses.Gerd Moellmann1999-11-011-7/+7
|
* (Fforward_word): Supply new ESCAPE_FROM_EDGE parameterGerd Moellmann1999-10-171-10/+5
| | | | | | to Fconstrain_to_field. (Fforward_word): Likewise. Constrain to any field.
* (update_syntax_table, find_defun_start, back_comment,Gerd Moellmann1999-09-201-20/+21
| | | | | | describe_syntax, skip_chars): Remove unused variables. (back_comment, forw_comment): Add braces to if-statement with if-else as dependent statement.
* Use XCAR and XCDR instead of explicit member access.Ken Raeburn1999-09-131-2/+2
|
* (Fforward_word): Use prompt_end_charpos insteadGerd Moellmann1999-09-121-2/+2
| | | | of minibuffer_prompt_length.
* (Fforward_word): Stop at a mini-buffer prompt endGerd Moellmann1999-09-021-11/+10
| | | | in both directions. Extend documentation.
* (lisp_parse_state, back_comment, Fmodify_syntax_entry)Richard M. Stallman1999-08-291-134/+225
| | | | | | (Fforward_comment, scan_lists, scan_sexps_forward) (Fparse_partial_sexp): Add support for nested comments. (forw_comment): New subroutine used in them.
* (Fforward_word): If in a mini-buffer and movingGerd Moellmann1999-08-251-0/+11
| | | | | backwards, stop in front of the prompt to prevent accidentially moving into the read-only prompt.
* (Fforward_comment): Set comstyle for Scomment_fence.Karl Heuer1999-08-161-1/+3
|
* (Fparse_partial_sexp): Correct test for element 8 to beDave Love1999-05-141-1/+2
| | | | non-nil.
* (scan_sexps_forward): Delete duplicate codeKarl Heuer1999-01-221-2/+9
| | | | | to set prev_from_syntax, above start of main loop. At startinstring, check syntax when checking for a match.
* (syms_of_syntax): Fix the setup of Qscan_error.Richard M. Stallman1998-10-201-1/+1
|
* (scan_lists): Bring FROM back into range BEGV...ZV.Richard M. Stallman1998-10-081-1/+6
|