# HG changeset patch # User Chong Yidong # Date 1147455579 0 # Node ID f5917c21d1873ed9bda5d1a2cc19fe4a40ca17c1 # Parent 29e84c94807d6ed267af531a6a1244e93d216a0b * 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. diff -r 29e84c94807d -r f5917c21d187 src/ChangeLog --- a/src/ChangeLog Fri May 12 16:18:37 2006 +0000 +++ b/src/ChangeLog Fri May 12 17:39:39 2006 +0000 @@ -1,3 +1,11 @@ +2006-05-12 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. + 2006-05-11 Richard Stallman * lread.c (readevalloop): Abort if START non-nil for non-buffer input. diff -r 29e84c94807d -r f5917c21d187 src/editfns.c --- a/src/editfns.c Fri May 12 16:18:37 2006 +0000 +++ b/src/editfns.c Fri May 12 17:39:39 2006 +0000 @@ -823,6 +823,8 @@ 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 @@ 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, diff -r 29e84c94807d -r f5917c21d187 src/intervals.c --- a/src/intervals.c Fri May 12 16:18:37 2006 +0000 +++ b/src/intervals.c Fri May 12 17:39:39 2006 +0000 @@ -2196,36 +2196,38 @@ 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_before = Qnil; + + if (from) + leave_after = textget (from->plist, Qpoint_left); else leave_after = Qnil; - if (from) - leave_before = textget (from->plist, Qpoint_left); - else - leave_before = Qnil; if (toprev) - enter_after = textget (toprev->plist, Qpoint_entered); + enter_before = textget (toprev->plist, Qpoint_entered); + else + enter_before = Qnil; + + if (to) + enter_after = textget (to->plist, Qpoint_entered); else enter_after = Qnil; - if (to) - enter_before = textget (to->plist, Qpoint_entered); - else - enter_before = 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)); } }