summaryrefslogtreecommitdiff
path: root/src/intervals.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in comment.Juanma Barranquero2002-10-181-28/+28
|
* * intervals.c (create_root_interval, balance_possible_root_interval,Ken Raeburn2002-07-151-4/+4
| | | | delete_interval, copy_intervals_to_string): Use STRING_SET_INTERVALS.
* Most uses of XSTRING combined with STRING_BYTES or indirection changed toKen Raeburn2002-07-151-9/+9
| | | | | SCHARS, SBYTES, STRING_INTERVALS, SREF, SDATA; explicit size_byte references left unchanged for now.
* (textget): Don't forget to `return'.Stefan Monnier2002-06-121-11/+7
| | | | (lookup_char_property): Use XCAR/XCDR.
* (lookup_char_property): New function for looking up overlay and textColin Walters2002-06-081-5/+24
| | | | | properties, created from textget. (textget): Use it.
* (adjust_for_invis_intang): New function.Miles Bader2002-03-141-29/+77
| | | | | | | (set_point_both): Use `adjust_for_invis_intang' to do most of the work for dealing with invisible+intangible regions. Do so before and after both forward and backward movements, to handle both front-sticky and rear-sticky cases.
* (set_point_both): The position after an invisible, intangibleRichard M. Stallman2001-12-281-14/+45
| | | | character is not an acceptable stopping point.
* (merge_properties_sticky): Likewise.Pavel Janík2001-12-091-1/+1
|
* (graft_intervals_into_buffer):Stefan Monnier2001-11-261-1/+1
| | | | Don't call set_text_properties_1 on an empty interval.
* (graft_intervals_into_buffer):Richard M. Stallman2001-11-111-8/+7
| | | | Use set_text_properties_1 to clear out properties.
* (graft_intervals_into_buffer): Remove #ifdef'd-out code.Pavel Janík2001-11-071-6/+0
| | | | (graft_intervals_into_buffer): Remove unused variable `middle'.
* (traverse_intervals): Drop `depth' arg.Stefan Monnier2001-10-121-4/+4
|
* (traverse_intervals): Use less stack space.Stefan Monnier2001-10-121-13/+36
| | | | | (traverse_intervals_noorder): New function. (search_for_interval, count_intervals): Use it.
* Include keymap.h.Stefan Monnier2001-10-081-0/+1
|
* Don't define min/max.Gerd Moellmann2001-10-081-2/+0
|
* (find_interval): Don't rebalance during signal handling.Stefan Monnier2001-04-121-2/+5
|
* (get_local_map): Change TYPE to Lisp_Object.Gerd Moellmann2001-01-121-11/+7
|
* (get_local_map): Remove unused variable `tem'.Eli Zaretskii2001-01-021-1/+1
|
* * lisp.h (KEYMAPP): New macro.Stefan Monnier2000-10-271-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (get_keymap): Remove. (get_keymap_1): Rename get_keymap. * keyboard.h (get_keymap_1, Fkeymapp): Remove prototype. * xterm.c (note_mode_line_highlight): Use KEYMAPP. * xmenu.c (single_submenu): Use KEYMAPP. (Fx_popup_menu): Fetch keymaps rather than checking Fkeymapp. Use KEYMAPP rather than Fkeymapp. * w32term.c (note_mode_line_highlight): Use KEYMAPP. * w32menu.c (True, False): Remove (use TRUE and FALSE instead). (Fx_popup_menu): Fetch keymaps rather than checking Fkeymapp. Use KEYMAPP rather than Fkeymapp. (single_submenu): Use KEYMAPP. (w32_menu_show, w32_dialog_show): Use TRUE. * minibuf.c (Fread_from_minibuffer): Update call to get_keymap. * keymap.c (KEYMAPP): Remove (moved to lisp.h). (Fkeymapp): Use KEYMAPP. (get_keymap): Rename from get_keymap_1. Remove old def. Return t when autoload=0 and error=0 and the keymap needs autoloading. (Fcopy_keymap): Check (eq (car x) 'keymap) rather than using Fkeymapp. (Fminor_mode_key_binding): Don't raise an error if the binding is not a keymap. (Fuse_global_map, Fuse_local_map): Allow autoloading. (Faccessible_keymaps): Fetch keymaps rather than checking Fkeymapp. * keyboard.c (read_char): get_keymap_1 -> get_keymap. Allow Vspecial_event_map to be autoloaded. (menu_bar_items): Fetch the keymap rather than using keymapp. (menu_bar_one_keymap): No need to follow func-indirect any more. (parse_menu_item): get_keymap_1 -> get_keymap. (tool_bar_items): Fetch the keymap rather than using keymapp. (read_key_sequence): Use KEYMAPP. * intervals.c (get_local_map): Use get_keymap rather than following function-indirections explicitly. * doc.c (Fsubstitute_command_keys): get_keymap_1 -> get_keymap.
* (get_local_map): Extra arg to allow looking for `keymap' too.Dave Love2000-05-291-5/+14
|
* Stop assuming interval pointers and lisp objects can be distinguished byKen Raeburn2000-03-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | inspection. Beginnings of support for expensive internal consistency checks. * config.in (ENABLE_CHECKING): Undef. * lisp.h (struct interval): Replace "parent" field with a union of interval pointer and Lisp_Object; add new bitfield to use as discriminant. Change other flag fields to bitfields. (CHECK): New macro for consistency checking. If ENABLE_CHECKING is defined and the supplied test fails, print a message and abort. (eassert): New macro. Use CHECK to provide an assert-like facility. * intervals.h (NULL_INTERVAL_P): Now applies only to real interval pointers; abort if the value looks like a lisp object. (NULL_INTERVAL_P, NULL_PARENT, HAS_PARENT, HAS_OBJECT, SET_PARENT, SET_OBJECT, INTERVAL_PARENT, GET_INTERVAL_OBJECT, COPY_PARENT): Modify for new interval parent definition. * alloc.c (mark_interval_tree, MARK_INTERVAL_TREE, UNMARK_BALANCE_INTERVALS): Update references that need an addressable lisp object in the interval structure. (die): New function. (suppress_checking): New variable. * intervals.c (interval_start_pos): Just return 0 if there's no parent object.
* Changes towards better type safety regarding intervals, primarilyKen Raeburn2000-03-221-51/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* (adjust_intervals_for_insertion): To check stickinesKenichi Handa1999-12-151-29/+140
| | | | | | of properties, pay attention to text-property-default-nonsticky. (merge_properties_sticky): Likewise. (get_property_and_range): New function.
* Remove USE_TEXT_PROPERTIES.Gerd Moellmann1999-11-111-5/+0
|
* (get_local_map): Use indirect_function,Phillip Rulon1999-10-091-1/+1
| | | | not Findirect_function.
* (rotate_right, rotate_left): Add braces to avoidGerd Moellmann1999-09-161-18/+18
| | | | | | | | | ambiguous else warning. (split_interval_left): Remove unused variables. (previous_interval, adjust_intervals_for_deletion, set_point_both, set_point_both, set_intervals_multibyte_1): Ditto. (icount, idepth, zero_length): Move into #if 0 section below original position where these are used.
* Use XCAR, XCDR, and XFLOAT_DATA instead of explicit member access.Ken Raeburn1999-09-131-1/+1
|
* Comment changes.Richard M. Stallman1999-07-011-2/+2
|
* (graft_intervals_into_buffer): Turn offRichard M. Stallman1999-04-061-0/+3
| | | | inhibit_modification_hooks around calling Fset_text_properties.
* (create_root_interval): Initialize position to 0Karl Heuer1998-06-031-27/+76
| | | | | | | | | | | for a string. (interval_start_pos): New function. (find_interval): Handle string positions starting at 0. (adjust_intervals_for_insertion): Likewise. (adjust_intervals_for_deletion): Likewise. (compare_string_intervals): Likewise. (graft_intervals_into_buffer): Set `position' in reproduce_tree value. (copy_intervals): Init `position' to 0.
* Fix -Wimplicit warnings.Andreas Schwab1998-04-141-2/+2
|
* (set_intervals_multibyte): Function moved after set_intervals_multibyte_1.Richard M. Stallman1998-04-031-15/+13
|
* (update_interval): Properly update `position' field of used intervals.Richard M. Stallman1998-03-021-7/+17
|
* (temp_set_point_both): Declare arg BYTEPOS as int.Kenichi Handa1998-02-201-2/+2
| | | | (set_point_both): Likewise.
* (split_interval_right): Make sure to callRichard M. Stallman1998-02-161-20/+20
| | | | | | | | balance_possible_root_interval in case an interval doesn't have a right child, because otherwise the interval tree might degenerate into a list. (split_interval_left): Ditto if an interval hasn't a left child.
* Update copyright year.Richard M. Stallman1998-01-211-1/+1
|
* (set_intervals_multibyte): New function.Richard M. Stallman1998-01-191-0/+74
| | | | (set_intervals_multibyte_1): New function.
* (set_point_both): Renamed from set_point;Richard M. Stallman1998-01-011-42/+90
| | | | | | | | New arg BYTE; BUFFER is now first arg; use temp_set_point_both. (set_point): New function; uses set_point_both. (temp_set_point_both): New function. (temp_set_point): Update BUF_PT_BYTE. (get_local_map): Save and restore both forms of the buffer bounds.
* (traverse_intervals): Protoize parameter.Andreas Schwab1997-11-211-1/+1
|
* (set_point): Convert call2 arguments to Lisp_Integer.Richard M. Stallman1997-07-121-4/+8
|
* Fix bugs with inappropriate mixing of Lisp_Object with int.Richard M. Stallman1997-07-041-7/+7
|
* (find_interval): No longer inline.Richard M. Stallman1997-06-021-1/+1
|
* (move_if_not_intangible): Fix previous change.Richard M. Stallman1997-05-311-2/+2
|
* (move_if_not_intangible): New function.Richard M. Stallman1997-05-311-0/+56
|
* Update copyright year.Richard M. Stallman1997-04-151-1/+1
|
* (update_interval): New function.Richard M. Stallman1997-04-151-0/+39
|
* (set_point): Use virtual bounds, not real bounds,Richard M. Stallman1996-12-201-4/+36
| | | | | in the abort test for POSITION. Skip the intangibility test if POSITION is at either end of buffer.
* (set_point): Use virtual bounds, not real bounds,Richard M. Stallman1996-12-181-2/+5
| | | | | in the abort test for POSITION. Skip the intangibility test if POSITION is at either end of buffer.
* (merge_properties_sticky): Don't discard explicit nilRichard M. Stallman1996-12-171-12/+24
| | | | | properties. Don't put on a front-sticky property if we inherit one from the category that does the job.
* (set_point): Check for intangible properties on overlays.Richard M. Stallman1996-12-151-42/+55
|