Mercurial > emacs
changeset 51452:e21c970a414e
(compilation-next-error): When moving fwd,
compare position of point with the errors.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 04 Jun 2003 09:31:38 +0000 |
parents | 75df22371834 |
children | 9bcc21ca740f |
files | lisp/progmodes/compile.el |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/compile.el Wed Jun 04 09:30:10 2003 +0000 +++ b/lisp/progmodes/compile.el Wed Jun 04 09:31:38 2003 +0000 @@ -1407,7 +1407,18 @@ (if (> (- n) i) (error "Moved back past first error") (nth (+ i n) compilation-old-error-list))) - (let ((compilation-error-list (cdr errors))) + (save-excursion + (while (> n 0) + ;; Discard the current error and any previous. + (while (>= (point) (car (car errors))) + (setq errors (cdr errors))) + ;; Now (car errors) is the next error. + ;; If we want to move down more errors, + ;; put point at this one and start again. + (setq n (1- n)) + (if (and errors (> n 0)) + (goto-char (car (car errors)))))) + (let ((compilation-error-list errors)) (compile-reinitialize-errors nil nil n) (if compilation-error-list (nth (1- n) compilation-error-list)