# HG changeset patch # User Richard M. Stallman # Date 1115216568 0 # Node ID 1f57a1631e4220a693ca9633676316fd1c6c2919 # Parent 7276665dac33ad1a761cedbebe3f581609b13701 (line-move-1): Fix previous change to signal errors appropriately. diff -r 7276665dac33 -r 1f57a1631e42 lisp/simple.el --- a/lisp/simple.el Wed May 04 14:21:38 2005 +0000 +++ b/lisp/simple.el Wed May 04 14:22:48 2005 +0000 @@ -3420,7 +3420,9 @@ ;; 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 @@ ;; 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)