comparison lisp/progmodes/compile.el @ 72025:7b30bf7651d1

(compilation-error-regexp-alist-alist) <gnu>: Try to rule out false positives due to time stamps. (compilation-mode-font-lock-keywords): Remove rules made redundant because of the above change. Add `segmentation fault' to the known and highlighted compilation termination messages.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 19 Jul 2006 19:20:11 +0000
parents adaad9cef326
children 6cf723aafba1 858cb33ae39d
comparison
equal deleted inserted replaced
72024:ee140bf82264 72025:7b30bf7651d1
224 224
225 (gnu 225 (gnu
226 ;; I have no idea what this first line is supposed to match, but it 226 ;; I have no idea what this first line is supposed to match, but it
227 ;; makes things ambiguous with output such as "foo:344:50:blabla" since 227 ;; makes things ambiguous with output such as "foo:344:50:blabla" since
228 ;; the "foo" part can match this first line (in which case the file 228 ;; the "foo" part can match this first line (in which case the file
229 ;; name as "344"). To avoid this, we disallow filenames exclusively 229 ;; name as "344"). To avoid this, the second line disallows filenames
230 ;; composed of digits. --Stef 230 ;; exclusively composed of digits. --Stef
231 ;; Similarly, we get lots of false positives with messages including
232 ;; times of the form "HH:MM:SS" where MM is taken as a line number, so
233 ;; the last line tries to rule out message where the info after the
234 ;; line number starts with "SS". --Stef
231 "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\)?\ 235 "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\)?\
232 \\([0-9]*[^0-9\n].*?\\): ?\ 236 \\([0-9]*[^0-9\n].*?\\): ?\
233 \\([0-9]+\\)\\(?:\\([.:]\\)\\([0-9]+\\)\\)?\ 237 \\([0-9]+\\)\\(?:\\([.:]\\)\\([0-9]+\\)\\)?\
234 \\(?:-\\([0-9]+\\)?\\(?:\\3\\([0-9]+\\)\\)?\\)?:\ 238 \\(?:-\\([0-9]+\\)?\\(?:\\3\\([0-9]+\\)\\)?\\)?:\
235 \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\ 239 \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\
236 *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\|instantiated from\\)\\)?" 240 *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\|instantiated from\\)\\|\
241 \[0-9]?\\(?:[^0-9\n]\\|$\\)\\|[0-9][0-9][0-9]\\)"
237 1 (2 . 5) (4 . 6) (7 . 8)) 242 1 (2 . 5) (4 . 6) (7 . 8))
238 243
239 (lcc 244 (lcc
240 "^\\(?:E\\|\\(W\\)\\), \\([^(\n]+\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)" 245 "^\\(?:E\\|\\(W\\)\\), \\([^(\n]+\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)"
241 2 3 4 (1)) 246 2 3 4 (1))
403 (defvar compilation-page-delimiter 408 (defvar compilation-page-delimiter
404 "^\\(?:\f\\|.*\\(?:Entering\\|Leaving\\) directory `.+'\n\\)+" 409 "^\\(?:\f\\|.*\\(?:Entering\\|Leaving\\) directory `.+'\n\\)+"
405 "Value of `page-delimiter' in Compilation mode.") 410 "Value of `page-delimiter' in Compilation mode.")
406 411
407 (defvar compilation-mode-font-lock-keywords 412 (defvar compilation-mode-font-lock-keywords
408 '(;; Don't highlight this as a compilation message. 413 '(;; configure output lines.
409 ("^Compilation started at.*"
410 (0 '(face nil message nil help-echo nil mouse-face nil) t))
411 ("^Compiling file .*"
412 (0 '(face nil message nil help-echo nil mouse-face nil) t))
413 ;; configure output lines.
414 ("^[Cc]hecking \\(?:[Ff]or \\|[Ii]f \\|[Ww]hether \\(?:to \\)?\\)?\\(.+\\)\\.\\.\\. *\\(?:(cached) *\\)?\\(\\(yes\\(?: .+\\)?\\)\\|no\\|\\(.*\\)\\)$" 414 ("^[Cc]hecking \\(?:[Ff]or \\|[Ii]f \\|[Ww]hether \\(?:to \\)?\\)?\\(.+\\)\\.\\.\\. *\\(?:(cached) *\\)?\\(\\(yes\\(?: .+\\)?\\)\\|no\\|\\(.*\\)\\)$"
415 (1 font-lock-variable-name-face) 415 (1 font-lock-variable-name-face)
416 (2 (compilation-face '(4 . 3)))) 416 (2 (compilation-face '(4 . 3))))
417 ;; Command output lines. Recognize `make[n]:' lines too. 417 ;; Command output lines. Recognize `make[n]:' lines too.
418 ("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:" 418 ("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:"
419 (1 font-lock-function-name-face) (3 compilation-line-face nil t)) 419 (1 font-lock-function-name-face) (3 compilation-line-face nil t))
420 (" --?o\\(?:utfile\\|utput\\)?[= ]?\\(\\S +\\)" . 1) 420 (" --?o\\(?:utfile\\|utput\\)?[= ]?\\(\\S +\\)" . 1)
421 ("^Compilation \\(finished\\).*" 421 ("^Compilation \\(finished\\).*"
422 (0 '(face nil message nil help-echo nil mouse-face nil) t) 422 (0 '(face nil message nil help-echo nil mouse-face nil) t)
423 (1 compilation-info-face)) 423 (1 compilation-info-face))
424 ("^Compilation \\(exited abnormally\\|interrupt\\|killed\\|terminated\\)\\(?:.*with code \\([0-9]+\\)\\)?.*" 424 ("^Compilation \\(exited abnormally\\|interrupt\\|killed\\|terminated\\|segmentation fault\\)\\(?:.*with code \\([0-9]+\\)\\)?.*"
425 (0 '(face nil message nil help-echo nil mouse-face nil) t) 425 (0 '(face nil message nil help-echo nil mouse-face nil) t)
426 (1 compilation-error-face) 426 (1 compilation-error-face)
427 (2 compilation-error-face nil t))) 427 (2 compilation-error-face nil t)))
428 "Additional things to highlight in Compilation mode. 428 "Additional things to highlight in Compilation mode.
429 This gets tacked on the end of the generated expressions.") 429 This gets tacked on the end of the generated expressions.")