diff options
| author | Kim F. Storm | 2005-03-15 23:15:05 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-03-15 23:15:05 +0000 |
| commit | 89767eec378ca4ab8088fd97ca29088fdd888bae (patch) | |
| tree | f59ecffd6e1e0ed52334ca943f3ed3ea5b2e6bd4 | |
| parent | bc4385889460726b6d914197ab74b57505d1fe66 (diff) | |
| download | emacs-89767eec378ca4ab8088fd97ca29088fdd888bae.tar.gz emacs-89767eec378ca4ab8088fd97ca29088fdd888bae.zip | |
(move-beginning-of-line): Use vertical-motion.
| -rw-r--r-- | lisp/simple.el | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 28b62a27098..d3624fc0a9c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3536,17 +3536,9 @@ boundaries bind `inhibit-field-text-motion' to t." | |||
| 3536 | (or arg (setq arg 1)) | 3536 | (or arg (setq arg 1)) |
| 3537 | (if (/= arg 1) | 3537 | (if (/= arg 1) |
| 3538 | (line-move (1- arg) t)) | 3538 | (line-move (1- arg) t)) |
| 3539 | (let (done pos) | 3539 | (let ((orig (point))) |
| 3540 | (while (not done) | 3540 | (vertical-motion 0) |
| 3541 | (beginning-of-line 1) | 3541 | (goto-char (constrain-to-field (point) orig (/= arg 1) t nil)))) |
| 3542 | ;; (not bolp) means that it stopped at a field boundary. | ||
| 3543 | (if (or (bobp) (not (bolp))) | ||
| 3544 | (setq done t) | ||
| 3545 | (sit-for 0) | ||
| 3546 | (if (and (consp (setq pos (pos-visible-in-window-p (point) nil t))) | ||
| 3547 | (= (car pos) 0)) | ||
| 3548 | (setq done t) | ||
| 3549 | (backward-char 1)))))) | ||
| 3550 | 3542 | ||
| 3551 | 3543 | ||
| 3552 | ;;; Many people have said they rarely use this feature, and often type | 3544 | ;;; Many people have said they rarely use this feature, and often type |