summaryrefslogtreecommitdiff
path: root/src/intervals.c
Commit message (Collapse)AuthorAgeFilesLines
* (verify_interval_modification): When checking read-only, allow for the caseKarl Heuer1994-02-041-15/+19
| | | | that stickiness might be t instead of a list.
* Add comments describing the rules used by the merge algorithm.Karl Heuer1994-02-041-46/+102
|
* (merge_properties_sticky): Preserve original order of properties.Karl Heuer1994-02-031-6/+6
|
* (graft_intervals_into_buffer): Fix one-offRichard M. Stallman1994-01-241-1/+1
| | | | comparing lengths of over and under.
* (rotate_right, rotate_left): SimplifyRichard M. Stallman1994-01-021-100/+140
| | | | | | | | | | | | | | | | | | total_length calculation. Minimize pointer dereferencing. (balance_an_interval): Remove recursive rebalancing. Rebalance precisely when imbalanced. If a rotation is done, rebalance only the node which may have become unbalanced. Iterate until the current node is balanced. (balance_possible_root_interval): New function. (balance_intervals): Move the interation into rebalance_an_interval. (balance_intervals_internal): New subroutine of balance_intervals. (split_interval_right, split_interval_left): Speed up by not checking LEAF_INTERVAL_P. (split_interval_right, split_interval_left, find_interval, adjust_intervals_for_insertion, graft_intervals_into_buffer): Add dynamic rebalancing anywhere a node may become unbalanced. (graft_intervals_into_buffer, copy_intervals): No longer any need to do a full rebalance as the tree stays balanced.
* (graft_intervals_into_buffer): If SOURCE is nullRichard M. Stallman1993-12-231-1/+1
| | | | and TREE is null, no need to call Fset_text_properties.
* (merge_properties_sticky): Declared.Richard M. Stallman1993-11-251-0/+2
|
* (graft_intervals_into_buffer): New arg LENGTH.Richard M. Stallman1993-11-251-4/+16
| | | | If source has no intervals, set dest properties to nil.
* Include puresize.h.Richard M. Stallman1993-11-101-1/+6
| | | | | (create_root_interval): Check to see if PARENT is in pure memory. If so, we cannot write it.
* (graft_intervals_into_buffer): New arg INHERIT.Richard M. Stallman1993-09-141-18/+17
|
* Include <config.h> instead of "config.h".Roland McGrath1993-09-101-1/+1
|
* (adjust_intervals_for_insertion): If inserting in middleRichard M. Stallman1993-08-151-6/+23
| | | | | | of interval that is sticky in neither direction, don't copy props. (merge_properties_sticky): Handle non-list as front-sticky or rear-nonsticky property.
* (adjust_intervals_for_insertion): Handle insertionRichard M. Stallman1993-07-311-121/+321
| | | | | | | | | | | | | | between two unlike intervals via merge_properties_sticky. (merge_properties_sticky): New function. (graft_intervals_into_buffer): Leave handling of `sticky'-ness to adjust_intervals_for_insertion, then merge properties of the inserted text onto the old ones. (textget_direct): New function. (set_point): Fix calculating of fromprev. (verify_interval_modification): Check for `read-only' property and take its `sticky'-ness into account. (set_point): Ignore `invisible' property unless property value is `hidden'.
* (set_point): Test Vinhibit_point_motion_hooks.Richard M. Stallman1993-07-231-2/+3
|
* (graft_intervals_into_buffer): When TREE is null,Richard M. Stallman1993-07-221-1/+3
| | | | pass buffer as 2nd arg to reproduce_tree.
* * intervals.c (split_interval_left, split_interval_right): ChangeJim Blandy1993-07-181-25/+28
| | | | | | | | | OFFSET argument of these functions to be origin 0, not origin 1. This is what all the callers currently want. * intervals.c, textprop.c: All callers changed. * intervals.c (graft_intervals_into_buffer): Properly compute length of buffer.
* (verify_interval_modification): Use Qinsert_in_front_hooks andRichard M. Stallman1993-07-131-2/+2
| | | | Qinsert_behind_hooks instead of previous names.
* (verify_interval_modification):Richard M. Stallman1993-07-131-3/+3
| | | | | For insertion, run the insert-before-hooks and insert-after-hooks, not the modification-hooks.
* * intervals.c (find_interval): Doc fixes, computation ofJim Blandy1993-07-061-86/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | tree->position rearranged for clarity. * intervals.c (find_interval): Consistently treat POSITION as an actual buffer position, i.e. origin 1. The old code seemed undecided on this point. Treat the end of the buffer as being part of the rightmost interval. (adjust_intervals_for_insertion): Consistently treat POSITION as origin 1. (interval_deletion_adjustment): The exception: FROM should be origin zero here. Consistently treat it as such. Simplify code which shrinks and possibly deletes intervals. (adjust_intervals_for_deletion): Treat start as origin 1; our caller does. (set_point): Use buffer positions throughout, not a mix of buffer posns and origin zero posns. (get_local_map): Remove special case for POSITION at end of buffer; find_interval handles that case correctly. (verify_interval_modification): Remove special case for START at end of buffer. * textprop.c (validate_interval_range): End-of-buffer/string positions no longer need special handling. * intervals.c (make_new_interval): #if 0 this out. Nobody calls it.
* Compare the values of text properties using EQ, not Fequal.Jim Blandy1993-07-061-1/+1
| | | | | * intervals.c (intervals_equal): Call EQ, not Fequal. * textprop.c (interval_has_all_properties, add_properties): Same.
* * intervals.c (intervals_equal): Test the return value of FequalJim Blandy1993-07-051-1/+1
| | | | against Qnil, not 0.
* (verify_interval_modification): Don't just testRichard M. Stallman1993-06-201-5/+6
| | | | Qread_only prop; use INTERVAL_WRITABLE_P.
* (adjust_intervals_for_insertion): By default, copyRichard M. Stallman1993-06-151-1/+1
| | | | properties from before the insertion.
* (set_point): When moving over invis chars,Richard M. Stallman1993-06-151-1/+4
| | | | don't screw up at end of buffer.
* Apply typo patches from Paul Eggert.Jim Blandy1993-06-091-3/+3
|
* (copy_intervals): Don't adjust total_length at the end.Richard M. Stallman1993-06-051-19/+25
| | | | | Set lengths of subintervals properly. (balance_intervals): Balance left as well as right.
* (interval_deletion_adjustment): Delete unreachable abort.Richard M. Stallman1993-05-311-1/+0
|
* * intervals.c (set_point): Check for point out of bounds beforeJim Blandy1993-05-141-4/+6
| | | | checking for an empty interval tree.
* (set_point): Check invisibility of following character, not previous character.Richard M. Stallman1993-03-101-15/+60
| | | | | | (textget): Handle categories. (get_local_map): New function. (verify_interval_modification): Call textget correctly.
* (verify_interval_modification): Handle insertionsRichard M. Stallman1993-03-071-39/+113
| | | | | | specially. For non-insertions, check only the chars being changed. `modification-hooks' property is now a list of functions. (set_point): Ignore chars outside current restriction.
* (intervals_equal): Handle one arg null and other not.Richard M. Stallman1993-03-011-162/+141
| | | | | | | | | | | | | | | | | | (set_point): Considerable rewrite. Handle intervals both before and after the old and new point values. Redo handling of invisible intervals, and of motion hooks. (textget): New function. (graft_intervals_into_buffer): create_root_interval needs Lisp object arg. Set tree to new root interval. Don't test TREE_LENGTH if buffer has no intervals. Rearrange code to copy properties so that it really does merge the inserted ones into the inherited ones. (traverse_intervals): Pass `arg' on recursive calls. (split_interval_left): Use new_length as basis for length of new. (traverse_intervals): New arg ARG.
* (traverse_intervals): New arg ARG.Richard M. Stallman1993-02-251-6/+6
|
* * intervals.c (traverse_intervals): New parameter `depth'.Joseph Arceneaux1992-10-141-10/+6
| | | | Increment this when passing recursively.
* * intervals.c: `copy_intervals()' no longer static.Joseph Arceneaux1992-10-031-6/+6
|
* Fixed typos.Joseph Arceneaux1992-10-021-6/+6
|
* * intervals.c: Removed #include of "screen.h".Joseph Arceneaux1992-10-021-1/+0
|
* * intervals.c: Conditionalize all functions onJoseph Arceneaux1992-10-021-0/+5
| | | | "USE_TEXT_PROPERTIES".
* Various comment changes.Joseph Arceneaux1992-10-011-6/+5
|
* See ChangeLogJoseph Arceneaux1992-09-241-231/+180
|
* comment changesJoseph Arceneaux1992-09-211-7/+30
|
* entered into RCSJoseph Arceneaux1992-09-191-42/+105
|
* Initial revisionJoseph Arceneaux1992-09-171-0/+1529