Commit ca41a64d authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(set_point): Use virtual bounds, not real bounds,

in the abort test for POSITION.
Skip the intangibility test if POSITION is at either end of buffer.
parent 97f7b3b2
......@@ -769,12 +769,44 @@ adjust_intervals_for_insertion (tree, position, length)
So split this interval at the insertion point. */
if (! (position == i->position || eobp)
&& ! FRONT_STICKY_P (i))
Lisp_Object tail;
Lisp_Object front, rear;
front = textget (i->plist, Qfront_sticky);
rear = textget (i->plist, Qrear_nonsticky);
/* Does any actual property pose an actual problem? */
for (tail = i->plist; ! NILP (tail); tail = Fcdr (Fcdr (tail)))
Lisp_Object prop;
prop = XCONS (tail)->car;
/* Is this particular property rear-sticky?
Note, if REAR isn't a cons, it must be non-nil,
which means that all properties are rear-nonsticky. */
if (CONSP (rear) && NILP (Fmemq (prop, rear)))
/* Is this particular property front-sticky?
Note, if FRONT isn't a cons, it must be nil,
which means that all properties are front-nonsticky. */
if (CONSP (front) && ! NILP (Fmemq (prop, front)))
/* PROP isn't sticky on either side => it is a real problem. */
/* If any property is a real problem, split the interval. */
if (! NILP (tail))
temp = split_interval_right (i, position - i->position);
copy_properties (i, temp);
i = temp;
/* If we are positioned between intervals, check the stickiness of
both of them. We have to do this too, if we are at BEG or Z. */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment