Commit 83b5c8e0 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

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

compare position of point with the errors.
parent 880b0421
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.
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment