summaryrefslogtreecommitdiff
path: root/src/intervals.c
Commit message (Collapse)AuthorAgeFilesLines
* Add 2008 to copyright years.Glenn Morris2008-01-081-1/+1
|
* Replace `iff' in comments.Glenn Morris2007-08-081-1/+1
|
* Switch license to GPLv3 or later.Glenn Morris2007-07-251-1/+1
|
* (merge_properties): Use explicit loop instead ofKim F. Storm2007-03-251-27/+37
| | | | | | Fplist_member to avoid QUIT. Don't use Fcdr. (intervals_equal): Likewise. Rewrite loop to perform length check on the fly rather than calling Flength. Don't use Fcar.
* Fix last change - reverse args to Fplist_member.Kim F. Storm2007-03-231-2/+2
|
* (merge_properties, intervals_equal):Kim F. Storm2007-03-231-4/+4
| | | | Use Fplist_member instead of Fmemq to find properties.
* Update copyright for years from Emacs 21 to present (mainly addingGlenn Morris2007-01-141-2/+2
| | | | 2001).
* Update comments.Chong Yidong2006-05-231-0/+4
|
* (get_local_map): Abort if POSITION outside BEGV, ZV.Richard M. Stallman2006-05-141-2/+4
|
* * intervals.c (set_point_both): Fix mixup before before and afterChong Yidong2006-05-121-16/+18
| | | | | | | in variable names. * editfns.c (Fline_beginning_position): Inhibit point-motion hooks while setting point temporarily.
* Update years in copyright notice; nfc.Thien-Thi Nguyen2006-02-061-1/+1
|
* (update_interval): Fix indentation and coding style. Add info in error.Stefan Monnier2005-09-011-4/+4
|
* Update years in copyright notice; nfc.Thien-Thi Nguyen2005-08-071-1/+2
|
* Update FSF's address.Lute Kamstra2005-07-041-2/+2
|
* (move_if_not_intangible): Force POSITION to be between BEGV and ZV.Richard M. Stallman2004-08-161-0/+4
|
* (lookup_char_property): Do not prematurely return nil.Luc Teirlinck2004-05-201-5/+7
|
* (graft_intervals_into_buffer): Handle over_used when splitting UNDER.Richard M. Stallman2003-09-301-2/+4
| | | | Set BUF_INTERVALS (buffer)->up_obj when appropriate.
* (graft_intervals_into_buffer): Correct the main loopRichard M. Stallman2003-09-221-2/+24
| | | | in the case where OVER is longer than UNDER.
* Add arch taglinesMiles Bader2003-09-011-0/+3
|
* (set_point_both): Use new type for overlays_(before|after).Stefan Monnier2003-07-091-2/+1
|
* (get_local_map): Don't get char-property of previousStefan Monnier2003-05-211-4/+0
| | | | point any more: get_pos_property already does it and better.
* (create_root_interval, graft_intervals_into_buffer): Use BEG.Stefan Monnier2003-05-171-28/+39
| | | | | | (merge_properties, intervals_equal, merge_properties_sticky): Use XCAR, XCDR. (adjust_for_invis_intang): Pass new arg to text_property_stickiness. (get_local_map): Use get_pos_property (for stickiness and empty overlays).
* Fix comment typo.Richard M. Stallman2003-04-211-1/+1
|
* Add many calls to CHECK_TOTAL_LENGTH.Richard M. Stallman2003-04-061-0/+88
| | | | | | | (set_intervals_multibyte_1): When becoming multibyte, adjust right and left child sizes to a whole set of characters. If an interval gets zero total-length, delete it. If an interval consists of just its children, delete one of them.
* 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.