Mercurial > emacs
changeset 73167:1b3313de1c4c
* simple.el (line-move-finish): Ignore field boundaries if the
initial and final points have the same `field' property.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Fri, 29 Sep 2006 18:18:42 +0000 |
parents | 7e2d2b8518f4 |
children | 3351001b9545 |
files | lisp/ChangeLog lisp/simple.el |
diffstat | 2 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 <cyd@stupidchicken.com> + + * 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 <storm@cua.dk> * ido.el (ido-file-internal): Only bind minibuffer-completing-file-name
--- 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.