# HG changeset patch # User Karl Heuer # Date 845789858 0 # Node ID 39556b6d7c6ed3fb67df010984f9ea9d62ddf011 # Parent 9851b8ecd4aacbd5965c5d12db336190e1c396fb (compilation-skip-to-next-location): Defined. (compilation-next-error-locus, compilation-parse-errors): Respect it. diff -r 9851b8ecd4aa -r 39556b6d7c6e lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Thu Oct 17 20:35:46 1996 +0000 +++ b/lisp/progmodes/compile.el Sun Oct 20 05:37:38 1996 +0000 @@ -992,6 +992,9 @@ (interactive) (next-error '(4))) +(defvar compilation-skip-to-next-location nil + "*If non-nil, skip multiple error messages for the same source location.") + (defun compilation-next-error-locus (&optional move reparse silent) "Visit next compilation error and return locus in corresponding source code. This operates on the output from the \\[compile] command. @@ -1131,11 +1134,12 @@ (setq next-errors compilation-error-list next-error (car next-errors))))) - ;; Skip over multiple error messages for the same source location, - ;; so the next C-x ` won't go to an error in the same place. - (while (and compilation-error-list - (equal (cdr (car compilation-error-list)) (cdr next-error))) - (setq compilation-error-list (cdr compilation-error-list))) + (if compilation-skip-to-next-location + ;; Skip over multiple error messages for the same source location, + ;; so the next C-x ` won't go to an error in the same place. + (while (and compilation-error-list + (equal (cdr (car compilation-error-list)) (cdr next-error))) + (setq compilation-error-list (cdr compilation-error-list)))) ;; We now have a marker for the position of the error source code. ;; NEXT-ERROR is a cons (ERROR . SOURCE) of two markers. @@ -1456,7 +1460,9 @@ (let ((this (cons (point-marker) (list filename linenum column)))) ;; Don't add the same source line more than once. - (if (equal (cdr this) (cdr (car compilation-error-list))) + (if (and compilation-skip-to-next-location + (equal (cdr this) + (cdr (car compilation-error-list)))) nil (setq compilation-error-list (cons this