# HG changeset patch # User Chong Yidong # Date 1147456120 0 # Node ID 2ed5d4bbedbf339e9d487d38d832f353638ddc6f # Parent 00605fe92bf7c827fd984923fb2b992c908d3985 * simple.el (line-move-finish): Fix last fix. diff -r 00605fe92bf7 -r 2ed5d4bbedbf lisp/ChangeLog --- a/lisp/ChangeLog Fri May 12 17:44:41 2006 +0000 +++ b/lisp/ChangeLog Fri May 12 17:48:40 2006 +0000 @@ -1,3 +1,8 @@ +2006-05-12 Chong Yidong + + * simple.el (line-move-finish): Avoid calling point motion hooks + while processing intangibility. + 2006-05-12 Dan Nicolaescu * term/xterm.el (terminal-init-xterm): Fix typo. diff -r 00605fe92bf7 -r 2ed5d4bbedbf lisp/simple.el --- a/lisp/simple.el Fri May 12 17:44:41 2006 +0000 +++ b/lisp/simple.el Fri May 12 17:48:40 2006 +0000 @@ -3645,25 +3645,30 @@ ;; Process intangibility within a line. ;; Move to the chosen destination position from above, ;; with intangibility processing enabled. + + ;; Avoid calling point-entered and point-left. (goto-char new) - ;; If intangibility moves us to a different (later) place - ;; in the same line, use that as the destination. - (if (<= (point) line-end) - (setq new (point)) - ;; If that position is "too late", - ;; try the previous allowable position. - ;; See if it is ok. - (backward-char) - (if (if forward - ;; If going forward, don't accept the previous - ;; allowable position if it is before the target line. - (< line-beg (point)) - ;; If going backward, don't accept the previous - ;; allowable position if it is still after the target line. - (<= (point) line-end)) + (let ((inhibit-point-motion-hooks nil)) + (goto-char new) + + ;; If intangibility moves us to a different (later) place + ;; in the same line, use that as the destination. + (if (<= (point) line-end) (setq new (point)) - ;; As a last resort, use the end of the line. - (setq new line-end))) + ;; If that position is "too late", + ;; try the previous allowable position. + ;; See if it is ok. + (backward-char) + (if (if forward + ;; If going forward, don't accept the previous + ;; allowable position if it is before the target line. + (< line-beg (point)) + ;; If going backward, don't accept the previous + ;; allowable position if it is still after the target line. + (<= (point) line-end)) + (setq new (point)) + ;; As a last resort, use the end of the line. + (setq new line-end)))) ;; Now move to the updated destination, processing fields ;; as well as intangibility.