aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorKim F. Storm <[email protected]>2005-03-15 23:15:05 +0000
committerKim F. Storm <[email protected]>2005-03-15 23:15:05 +0000
commit89767eec378ca4ab8088fd97ca29088fdd888bae (patch)
treef59ecffd6e1e0ed52334ca943f3ed3ea5b2e6bd4 /lisp/simple.el
parentbc4385889460726b6d914197ab74b57505d1fe66 (diff)
(move-beginning-of-line): Use vertical-motion.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el14
1 files changed, 3 insertions, 11 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 28b62a2709..d3624fc0a9 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3536,17 +3536,9 @@ boundaries bind `inhibit-field-text-motion' to t."
(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