aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2005-07-13 13:45:30 +0000
committerKim F. Storm2005-07-13 13:45:30 +0000
commit3e43ae87c41dd34b2bb883b0e947efaa1fd4cda8 (patch)
tree2b95e5c274b0a654b0e2516be608b6e74c3bc345
parenta937cb3957967e735eb7a1caadc781a8fa404a98 (diff)
downloademacs-3e43ae87c41dd34b2bb883b0e947efaa1fd4cda8.tar.gz
emacs-3e43ae87c41dd34b2bb883b0e947efaa1fd4cda8.zip
(line-move-1): Undo rest of 2005-06-23 change.
-rw-r--r--lisp/simple.el66
1 files changed, 29 insertions, 37 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 7c6a1e5ccf4..e0622aed690 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3440,49 +3440,41 @@ Outline mode sets this."
3440 ;; Now move a line. 3440 ;; Now move a line.
3441 (end-of-line) 3441 (end-of-line)
3442 ;; If there's no invisibility here, move over the newline. 3442 ;; If there's no invisibility here, move over the newline.
3443 (let ((pos-before (point)) 3443 (cond
3444 line-done) 3444 ((eobp)
3445 (if (eobp) 3445 (if (not noerror)
3446 (if (not noerror) 3446 (signal 'end-of-buffer nil)
3447 (signal 'end-of-buffer nil) 3447 (setq done t)))
3448 (setq done t))) 3448 ((and (> arg 1) ;; Use vertical-motion for last move
3449 (when (and (not done) 3449 (not (integerp selective-display))
3450 (> arg 1) ;; Use vertical-motion for last move 3450 (not (line-move-invisible-p (point))))
3451 (not (integerp selective-display)) 3451 ;; We avoid vertical-motion when possible
3452 (not (line-move-invisible-p (point)))) 3452 ;; because that has to fontify.
3453 ;; We avoid vertical-motion when possible 3453 (forward-line 1))
3454 ;; because that has to fontify. 3454 ;; Otherwise move a more sophisticated way.
3455 (forward-line 1) 3455 ((zerop (vertical-motion 1))
3456 (setq line-done t)) 3456 (if (not noerror)
3457 (and (not done) (not line-done) 3457 (signal 'end-of-buffer nil)
3458 ;; Otherwise move a more sophisticated way. 3458 (setq done t))))
3459 (zerop (vertical-motion 1))
3460 (if (not noerror)
3461 (signal 'end-of-buffer nil)
3462 (setq done t))))
3463 (unless done 3459 (unless done
3464 (setq arg (1- arg)))) 3460 (setq arg (1- arg))))
3465 ;; The logic of this is the same as the loop above, 3461 ;; The logic of this is the same as the loop above,
3466 ;; it just goes in the other direction. 3462 ;; it just goes in the other direction.
3467 (while (and (< arg 0) (not done)) 3463 (while (and (< arg 0) (not done))
3468 (beginning-of-line) 3464 (beginning-of-line)
3469 (let ((pos-before (point)) 3465 (cond
3470 line-done) 3466 ((bobp)
3471 (if (bobp) 3467 (if (not noerror)
3472 (if (not noerror) 3468 (signal 'beginning-of-buffer nil)
3473 (signal 'beginning-of-buffer nil) 3469 (setq done t)))
3474 (setq done t))) 3470 ((and (< arg -1) ;; Use vertical-motion for last move
3475 (when (and (not done) 3471 (not (integerp selective-display))
3476 (< arg -1) ;; Use vertical-motion for last move 3472 (not (line-move-invisible-p (1- (point)))))
3477 (not (integerp selective-display)) 3473 (forward-line -1))
3478 (not (line-move-invisible-p (1- (point))))) 3474 ((zerop (vertical-motion -1))
3479 (forward-line -1) 3475 (if (not noerror)
3480 (setq line-done t)) 3476 (signal 'beginning-of-buffer nil)
3481 (and (not done) (not line-done) 3477 (setq done t))))
3482 (zerop (vertical-motion -1))
3483 (if (not noerror)
3484 (signal 'beginning-of-buffer nil)
3485 (setq done t))))
3486 (unless done 3478 (unless done
3487 (setq arg (1+ arg)) 3479 (setq arg (1+ arg))
3488 (while (and ;; Don't move over previous invis lines 3480 (while (and ;; Don't move over previous invis lines