Mercurial > emacs
changeset 16448:39556b6d7c6e
(compilation-skip-to-next-location): Defined.
(compilation-next-error-locus, compilation-parse-errors): Respect it.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Sun, 20 Oct 1996 05:37:38 +0000 |
parents | 9851b8ecd4aa |
children | 31ffc80a329d |
files | lisp/progmodes/compile.el |
diffstat | 1 files changed, 12 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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