changeset 83270:42406ecdf5bf

Merged from miles@gnu.org--gnu-2005 (patch 183) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-183 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-310
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 16 Mar 2005 16:06:45 +0000
parents 48ba3f89c89f (current diff) e51f0754a4c4 (diff)
children 1830bcd0eec0
files lisp/ChangeLog lisp/simple.el
diffstat 2 files changed, 7 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Mar 16 16:06:15 2005 +0000
+++ b/lisp/ChangeLog	Wed Mar 16 16:06:45 2005 +0000
@@ -1,3 +1,7 @@
+2005-03-15  Kim F. Storm  <storm@cua.dk>
+
+	* simple.el (move-beginning-of-line): Use vertical-motion.
+
 2005-03-15  Juri Linkov  <juri@jurta.org>
 
 	* isearch.el (isearch-error): New variable.
--- a/lisp/simple.el	Wed Mar 16 16:06:15 2005 +0000
+++ b/lisp/simple.el	Wed Mar 16 16:06:45 2005 +0000
@@ -3540,17 +3540,9 @@
   (or arg (setq arg 1))
   (if (/= arg 1)
       (line-move (1- arg) t))
-  (let (done pos)
-    (while (not done)
-      (beginning-of-line 1)
-      ;; (not bolp) means that it stopped at a field boundary.
-      (if (or (bobp) (not (bolp)))
-	  (setq done t)
-	(sit-for 0)
-	(if (and (consp (setq pos (pos-visible-in-window-p (point) nil t)))
-		 (= (car pos) 0))
-	    (setq done t)
-	  (backward-char 1))))))
+  (let ((orig (point)))
+    (vertical-motion 0)
+    (goto-char (constrain-to-field (point) orig (/= arg 1) t nil))))
 
 
 ;;; Many people have said they rarely use this feature, and often type