Mercurial > emacs
comparison lisp/simple.el @ 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 | 91b85d61710d |
children | ea21bf283231 08185296b491 |
comparison
equal
deleted
inserted
replaced
62058:7276665dac33 | 62059:1f57a1631e42 |
---|---|
3418 ;; If there's no invisibility here, move over the newline. | 3418 ;; If there's no invisibility here, move over the newline. |
3419 (if (not (line-move-invisible-p (point))) | 3419 (if (not (line-move-invisible-p (point))) |
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?) |
3427 (and (zerop (vertical-motion 1)) | 3429 (and (zerop (vertical-motion 1)) |
3428 (if (not noerror) | 3430 (if (not noerror) |
3432 (setq arg (1- arg)))) | 3434 (setq arg (1- arg)))) |
3433 ;; The logic of this is the same as the loop above, | 3435 ;; The logic of this is the same as the loop above, |
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) |
3443 (signal 'beginning-of-buffer nil) | 3447 (signal 'beginning-of-buffer nil) |
3444 (setq done t)))) | 3448 (setq done t)))) |