Commit 4e8f005c authored by Chong Yidong's avatar Chong Yidong

* intervals.c (set_point_both): Fix mixup before before and after

	in variable names.

	* editfns.c (Fline_beginning_position): Inhibit point-motion hooks
	while setting point temporarily.
parent d041c8c9
2006-05-12 Chong Yidong <cyd@stupidchicken.com>
* intervals.c (set_point_both): Fix mixup before before and after
in variable names.
* editfns.c (Fline_beginning_position): Inhibit point-motion hooks
while setting point temporarily.
2006-05-11 Richard Stallman <rms@gnu.org>
* lread.c (readevalloop): Abort if START non-nil for non-buffer input.
......
......@@ -823,6 +823,8 @@ This function does not move point. */)
Lisp_Object n;
{
int orig, orig_byte, end;
int count = SPECPDL_INDEX ();
specbind (Qinhibit_point_motion_hooks, Qt);
if (NILP (n))
XSETFASTINT (n, 1);
......@@ -836,6 +838,8 @@ This function does not move point. */)
SET_PT_BOTH (orig, orig_byte);
unbind_to (count, Qnil);
/* Return END constrained to the current input field. */
return Fconstrain_to_field (make_number (end), make_number (orig),
XINT (n) != 1 ? Qt : Qnil,
......
......@@ -2196,36 +2196,38 @@ set_point_both (buffer, charpos, bytepos)
Lisp_Object leave_after, leave_before, enter_after, enter_before;
if (fromprev)
leave_after = textget (fromprev->plist, Qpoint_left);
leave_before = textget (fromprev->plist, Qpoint_left);
else
leave_after = Qnil;
leave_before = Qnil;
if (from)
leave_before = textget (from->plist, Qpoint_left);
leave_after = textget (from->plist, Qpoint_left);
else
leave_before = Qnil;
leave_after = Qnil;
if (toprev)
enter_after = textget (toprev->plist, Qpoint_entered);
enter_before = textget (toprev->plist, Qpoint_entered);
else
enter_after = Qnil;
enter_before = Qnil;
if (to)
enter_before = textget (to->plist, Qpoint_entered);
enter_after = textget (to->plist, Qpoint_entered);
else
enter_before = Qnil;
enter_after = Qnil;
if (! EQ (leave_before, enter_before) && !NILP (leave_before))
call2 (leave_before, make_number (old_position),
make_number (charpos));
call2 (leave_before, make_number (old_position),
make_number (charpos));
if (! EQ (leave_after, enter_after) && !NILP (leave_after))
call2 (leave_after, make_number (old_position),
make_number (charpos));
call2 (leave_after, make_number (old_position),
make_number (charpos));
if (! EQ (enter_before, leave_before) && !NILP (enter_before))
call2 (enter_before, make_number (old_position),
make_number (charpos));
call2 (enter_before, make_number (old_position),
make_number (charpos));
if (! EQ (enter_after, leave_after) && !NILP (enter_after))
call2 (enter_after, make_number (old_position),
make_number (charpos));
call2 (enter_after, make_number (old_position),
make_number (charpos));
}
}
......
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