# HG changeset patch # User Roland McGrath # Date 712541293 0 # Node ID 38d1af64858cf75c6dd0815b3712ea9737abd424 # Parent 4fcbe8aa7ccc48bc9d43786d999380ca5ed1760c *** empty log message *** diff -r 4fcbe8aa7ccc -r 38d1af64858c lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Thu Jul 30 21:09:53 1992 +0000 +++ b/lisp/progmodes/compile.el Fri Jul 31 00:08:13 1992 +0000 @@ -486,10 +486,10 @@ (compile-reinitialize-errors argp (point)) ;; Move compilation-error-list to the elt of compilation-old-error-list - ;; whose cadr is the error we want. + ;; we want. (setq compilation-error-list compilation-old-error-list) - (while (and (cdr compilation-error-list) - (> (point) (car (car (cdr compilation-error-list))))) + (while (and compilation-error-list + (> (point) (car (car compilation-error-list)))) (setq compilation-error-list (cdr compilation-error-list))) ;; Move to another window, so that next-error's window changes @@ -501,7 +501,7 @@ ;; but we didn't want to do that. (set-buffer compilation-last-buffer))) - (next-error 0)) + (next-error 1)) (defun compilation-buffer-p (buffer) (assq 'compilation-error-list (buffer-local-variables buffer))) @@ -569,9 +569,8 @@ (let (next-errors next-error) (save-excursion (set-buffer compilation-last-buffer) - ;; This code used to do something bizarre and incomprehensible. - ;; Was there a reason I wrote it like that? --roland - (setq next-errors (nthcdr (prefix-numeric-value argp) + ;; compilation-error-list points to the "current" error. + (setq next-errors (nthcdr (1- (prefix-numeric-value argp)) compilation-error-list) next-error (car next-errors)) (while