# HG changeset patch # User Chong Yidong # Date 1159553922 0 # Node ID 1b3313de1c4c7c8748f57757fa2d63b043395585 # Parent 7e2d2b8518f4086bd6360e44e9503d42ed95df54 * simple.el (line-move-finish): Ignore field boundaries if the initial and final points have the same `field' property. diff -r 7e2d2b8518f4 -r 1b3313de1c4c lisp/ChangeLog --- a/lisp/ChangeLog Fri Sep 29 12:25:35 2006 +0000 +++ b/lisp/ChangeLog Fri Sep 29 18:18:42 2006 +0000 @@ -1,3 +1,8 @@ +2006-09-29 Chong Yidong + + * simple.el (line-move-finish): Ignore field boundaries if the + initial and final points have the same `field' property. + 2006-09-29 Kim F. Storm * ido.el (ido-file-internal): Only bind minibuffer-completing-file-name diff -r 7e2d2b8518f4 -r 1b3313de1c4c lisp/simple.el --- a/lisp/simple.el Fri Sep 29 12:25:35 2006 +0000 +++ b/lisp/simple.el Fri Sep 29 18:18:42 2006 +0000 @@ -3735,8 +3735,15 @@ (goto-char opoint) (let ((inhibit-point-motion-hooks nil)) (goto-char - (constrain-to-field new opoint t t - 'inhibit-line-move-field-capture))) + ;; Ignore field boundaries if the initial and final + ;; positions have the same `field' property, even if the + ;; fields are non-contiguous. This seems to be "nicer" + ;; behavior in many situations. + (if (eq (get-char-property new 'field) + (get-char-property opoint 'field)) + new + (constrain-to-field new opoint t t + 'inhibit-line-move-field-capture)))) ;; If all this moved us to a different line, ;; retry everything within that new line.