aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/simple.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 73c01e98f61..43a5708d6c3 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3420,7 +3420,9 @@ Outline mode sets this."
3420 ;; We avoid vertical-motion when possible 3420 ;; We avoid vertical-motion when possible
3421 ;; because that has to fontify. 3421 ;; because that has to fontify.
3422 (if (eobp) 3422 (if (eobp)
3423 (setq done t) 3423 (if (not noerror)
3424 (signal 'end-of-buffer nil)
3425 (setq done t))
3424 (forward-line 1)) 3426 (forward-line 1))
3425 ;; Otherwise move a more sophisticated way. 3427 ;; Otherwise move a more sophisticated way.
3426 ;; (What's the logic behind this code?) 3428 ;; (What's the logic behind this code?)
@@ -3434,9 +3436,11 @@ Outline mode sets this."
3434 ;; it just goes in the other direction. 3436 ;; it just goes in the other direction.
3435 (while (and (< arg 0) (not done)) 3437 (while (and (< arg 0) (not done))
3436 (beginning-of-line) 3438 (beginning-of-line)
3437 (if (not (line-move-invisible-p (1- (point)))) 3439 (if (or (bobp) (not (line-move-invisible-p (1- (point)))))
3438 (if (bobp) 3440 (if (bobp)
3439 (setq done t) 3441 (if (not noerror)
3442 (signal 'beginning-of-buffer nil)
3443 (setq done t))
3440 (forward-line -1)) 3444 (forward-line -1))
3441 (if (zerop (vertical-motion -1)) 3445 (if (zerop (vertical-motion -1))
3442 (if (not noerror) 3446 (if (not noerror)