From: Chong Yidong Date: Fri, 29 Sep 2006 18:18:42 +0000 (+0000) Subject: * simple.el (line-move-finish): Ignore field boundaries if the X-Git-Tag: emacs-pretest-22.0.90~303 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e94e78cc99454212acbfe3016cf1b7605c074d60;p=emacs.git * simple.el (line-move-finish): Ignore field boundaries if the initial and final points have the same `field' property. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0fd306e10f5..d1db638e588 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/simple.el b/lisp/simple.el index 16670d4f70b..53c9c680cc9 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3735,8 +3735,15 @@ Outline mode sets this." (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.