| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
that stickiness might be t instead of a list.
|
| |
|
| |
|
|
|
|
| |
comparing lengths of over and under.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
and TREE is null, no need to call Fset_text_properties.
|
| |
|
|
|
|
| |
If source has no intervals, set dest properties to nil.
|
|
|
|
|
| |
(create_root_interval): Check to see if PARENT is in
pure memory. If so, we cannot write it.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'.
|
| |
|
|
|
|
| |
pass buffer as 2nd arg to reproduce_tree.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Qinsert_behind_hooks instead of previous names.
|
|
|
|
|
| |
For insertion, run the insert-before-hooks and insert-after-hooks,
not the modification-hooks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* intervals.c (intervals_equal): Call EQ, not Fequal.
* textprop.c (interval_has_all_properties, add_properties): Same.
|
|
|
|
| |
against Qnil, not 0.
|
|
|
|
| |
Qread_only prop; use INTERVAL_WRITABLE_P.
|
|
|
|
| |
properties from before the insertion.
|
|
|
|
| |
don't screw up at end of buffer.
|
| |
|
|
|
|
|
| |
Set lengths of subintervals properly.
(balance_intervals): Balance left as well as right.
|
| |
|
|
|
|
| |
checking for an empty interval tree.
|
|
|
|
|
|
| |
(textget): Handle categories.
(get_local_map): New function.
(verify_interval_modification): Call textget correctly.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
| |
|
|
|
|
| |
Increment this when passing recursively.
|
| |
|
| |
|
| |
|
|
|
|
| |
"USE_TEXT_PROPERTIES".
|
| |
|
| |
|
| |
|
| |
|
|
|