(compilation-next-error): When moving fwd,

compare position of point with the errors.
This commit is contained in:
Richard M. Stallman 2003-06-04 09:31:46 +00:00
parent 880b04211a
commit 83b5c8e0e3
2 changed files with 15 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2003-06-04 Richard M. Stallman <rms@gnu.org>
* progmodes/compile.el (compilation-next-error): When moving fwd,
compare position of point with the errors.
* dired.el (dired-get-filename): Err for . and .. in usual case.
(dired-get-file-for-visit): Specify no-error to dired-get-filename,
and check for real errors here.

View file

@ -1407,7 +1407,18 @@ Does NOT find the source line like \\[next-error]."
(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)