# HG changeset patch # User Richard M. Stallman # Date 1011926196 0 # Node ID 0786ea38f9fd1d72b94989535a36283c22c18665 # Parent f1689ed2433ee84053ff76a3bc819a071acd4c79 (compilation-handle-exit): Add a compilation-handle-exit property to the "finished" message. (compilation-parse-errors): Stop parsing when that property is seen. diff -r f1689ed2433e -r 0786ea38f9fd lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Fri Jan 25 02:32:18 2002 +0000 +++ b/lisp/progmodes/compile.el Fri Jan 25 02:36:36 2002 +0000 @@ -1150,6 +1150,9 @@ (forward-char -1)) (insert " at " (substring (current-time-string) 0 19)) (goto-char (point-max)) + ;; Prevent that message from being recognized as a compilation error. + (add-text-properties omax (point) + (append '(compilation-handle-exit t) nil)) (setq mode-line-process (format ":%s [%s]" process-status (cdr status))) ;; Force mode line redisplay soon. (force-mode-line-update) @@ -1928,7 +1931,10 @@ (forward-line 2)) ;; Parse messages. - (while (not (or found-desired (eobp))) + (while (not (or found-desired (eobp) + ;; Don't parse the "compilation finished" message + ;; as a compilation error. + (get-text-property (point) 'compilation-handle-exit))) (let ((this compilation-regexps) (prev nil) (alist nil) type) ;; Go through the regular expressions. If a match is found, ;; variable alist is set to the corresponding alist and the @@ -2117,9 +2123,9 @@ ;; Use floating-point because (* 100 (point)) frequently ;; exceeds the range of Emacs Lisp integers. (/ (* 100.0 (point)) (point-max))) - )) + ))) - (forward-line 1))) ; End of while loop. Look at next line. + (forward-line 1)) ; End of while loop. Look at next line. (set-marker compilation-parsing-end (point)) (setq compilation-error-list (nreverse compilation-error-list))