From f33ae5d01acbd16a62dd86c433b7765e2be09615 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 4 May 2005 14:22:48 +0000 Subject: [PATCH] (line-move-1): Fix previous change to signal errors appropriately. --- lisp/simple.el | 10 +++++++--- 1 file 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." ;; We avoid vertical-motion when possible ;; because that has to fontify. (if (eobp) - (setq done t) + (if (not noerror) + (signal 'end-of-buffer nil) + (setq done t)) (forward-line 1)) ;; Otherwise move a more sophisticated way. ;; (What's the logic behind this code?) @@ -3434,9 +3436,11 @@ Outline mode sets this." ;; it just goes in the other direction. (while (and (< arg 0) (not done)) (beginning-of-line) - (if (not (line-move-invisible-p (1- (point)))) + (if (or (bobp) (not (line-move-invisible-p (1- (point))))) (if (bobp) - (setq done t) + (if (not noerror) + (signal 'beginning-of-buffer nil) + (setq done t)) (forward-line -1)) (if (zerop (vertical-motion -1)) (if (not noerror) -- 2.39.2