]> git.eshelyaron.com Git - emacs.git/commitdiff
* simple.el (line-move-finish): Ignore field boundaries if the
authorChong Yidong <cyd@stupidchicken.com>
Fri, 29 Sep 2006 18:18:42 +0000 (18:18 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 29 Sep 2006 18:18:42 +0000 (18:18 +0000)
initial and final points have the same `field' property.

lisp/ChangeLog
lisp/simple.el

index 0fd306e10f51d8df27a05aa96b95fe99b91dc69d..d1db638e588607231ace75cb75005a115504f5e9 100644 (file)
@@ -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
index 16670d4f70bd344cec9514087b0a89dedcbdf2c7..53c9c680cc979fae4b34baf925223685c2602a83 100644 (file)
@@ -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.