emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog simple.el


From: Chong Yidong
Subject: [Emacs-diffs] emacs/lisp ChangeLog simple.el
Date: Sun, 06 Dec 2009 18:48:52 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      09/12/06 18:48:52

Modified files:
        lisp           : ChangeLog simple.el 

Log message:
        * simple.el (beginning-of-visual-line): Constrain to field
        boundaries (Bug#5106).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16842&r2=1.16843
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/simple.el?cvsroot=emacs&r1=1.1034&r2=1.1035

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16842
retrieving revision 1.16843
diff -u -b -r1.16842 -r1.16843
--- ChangeLog   6 Dec 2009 18:13:19 -0000       1.16842
+++ ChangeLog   6 Dec 2009 18:48:48 -0000       1.16843
@@ -1,3 +1,8 @@
+2009-12-06  Chong Yidong  <address@hidden>
+
+       * simple.el (beginning-of-visual-line): Constrain to field
+       boundaries (Bug#5106).
+
 2009-12-06  Ulf Jasper  <address@hidden>
 
        * xml.el (xml-substitute-numeric-entities): Moved

Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.1034
retrieving revision 1.1035
diff -u -b -r1.1034 -r1.1035
--- simple.el   1 Dec 2009 18:06:09 -0000       1.1034
+++ simple.el   6 Dec 2009 18:48:52 -0000       1.1035
@@ -4576,6 +4576,8 @@
   (if (/= n 1)
       (let ((line-move-visual t))
        (line-move (1- n) t)))
+  ;; Unlike `move-beginning-of-line', `move-end-of-line' doesn't
+  ;; constrain to field boundaries, so we don't either.
   (vertical-motion (cons (window-width) 0)))
 
 (defun beginning-of-visual-line (&optional n)
@@ -4585,10 +4587,13 @@
 To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
   (interactive "^p")
   (or n (setq n 1))
+  (let ((opoint (point)))
   (if (/= n 1)
       (let ((line-move-visual t))
        (line-move (1- n) t)))
-  (vertical-motion 0))
+    (vertical-motion 0)
+    ;; Constrain to field boundaries, like `move-beginning-of-line'.
+    (goto-char (constrain-to-field (point) opoint (/= n 1)))))
 
 (defun kill-visual-line (&optional arg)
   "Kill the rest of the visual line.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]