Mercurial > emacs
changeset 62059:1f57a1631e42
(line-move-1): Fix previous change to signal errors appropriately.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 04 May 2005 14:22:48 +0000 |
parents | 7276665dac33 |
children | 9f98f54d05d7 |
files | lisp/simple.el |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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)