comparison lisp/progmodes/compile.el @ 64943:0734dceb92d1

(compilation-mode-font-lock-keywords): Remove highlighting of "Compilation started". Highlight only the word "finished" in "Compilation finished". Add highlighting of "interrupt", "killed", "terminated" and the exit code. (compilation-start): Add newline after header. Use exactly the same time stamp format as the finishing message. (compilation-mode-map): Add ellipsis to "Search Files (grep)".
author Juri Linkov <juri@jurta.org>
date Sun, 14 Aug 2005 06:51:49 +0000
parents 37347aa3aaae
children fb2cad4cfb30
comparison
equal deleted inserted replaced
64942:b8351cf25d1b 64943:0734dceb92d1
380 (2 (compilation-face '(4 . 3)))) 380 (2 (compilation-face '(4 . 3))))
381 ;; Command output lines. Recognize `make[n]:' lines too. 381 ;; Command output lines. Recognize `make[n]:' lines too.
382 ("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:" 382 ("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:"
383 (1 font-lock-function-name-face) (3 compilation-line-face nil t)) 383 (1 font-lock-function-name-face) (3 compilation-line-face nil t))
384 (" --?o\\(?:utfile\\|utput\\)?[= ]?\\(\\S +\\)" . 1) 384 (" --?o\\(?:utfile\\|utput\\)?[= ]?\\(\\S +\\)" . 1)
385 ("^Compilation \\(finish\\|start\\)ed" . compilation-info-face) 385 ("^Compilation \\(finished\\)"
386 ("^Compilation exited abnormally" . compilation-error-face)) 386 (1 compilation-info-face))
387 ("^Compilation \\(exited abnormally\\|interrupt\\|killed\\|terminated\\)\\(?:.*with code \\([0-9]+\\)\\)?"
388 (1 compilation-error-face)
389 (2 compilation-error-face nil t)))
387 "Additional things to highlight in Compilation mode. 390 "Additional things to highlight in Compilation mode.
388 This gets tacked on the end of the generated expressions.") 391 This gets tacked on the end of the generated expressions.")
389 392
390 (defvar compilation-highlight-regexp t 393 (defvar compilation-highlight-regexp t
391 "Regexp matching part of visited source lines to highlight temporarily. 394 "Regexp matching part of visited source lines to highlight temporarily.
969 highlight-regexp)) 972 highlight-regexp))
970 ;; Output a mode setter, for saving and later reloading this buffer. 973 ;; Output a mode setter, for saving and later reloading this buffer.
971 (insert "-*- mode: " name-of-mode 974 (insert "-*- mode: " name-of-mode
972 "; default-directory: " (prin1-to-string default-directory) 975 "; default-directory: " (prin1-to-string default-directory)
973 " -*-\n" 976 " -*-\n"
974 (format "%s started at %s\n" 977 (format "%s started at %s\n\n"
975 (capitalize name-of-mode) 978 mode-name
976 (format-time-string "%a %b %d %H:%M:%S")) 979 (substring (current-time-string) 0 19))
977 command "\n") 980 command "\n")
978 (setq thisdir default-directory)) 981 (setq thisdir default-directory))
979 (set-buffer-modified-p nil)) 982 (set-buffer-modified-p nil))
980 ;; If we're already in the compilation buffer, go to the end 983 ;; If we're already in the compilation buffer, go to the end
981 ;; of the buffer, so point will track the compilation output. 984 ;; of the buffer, so point will track the compilation output.
1158 (cons "Compile" submap)) 1161 (cons "Compile" submap))
1159 (set-keymap-parent submap compilation-menu-map)) 1162 (set-keymap-parent submap compilation-menu-map))
1160 (define-key map [menu-bar compilation compilation-separator2] 1163 (define-key map [menu-bar compilation compilation-separator2]
1161 '("----" . nil)) 1164 '("----" . nil))
1162 (define-key map [menu-bar compilation compilation-grep] 1165 (define-key map [menu-bar compilation compilation-grep]
1163 '("Search Files (grep)" . grep)) 1166 '("Search Files (grep)..." . grep))
1164 (define-key map [menu-bar compilation compilation-recompile] 1167 (define-key map [menu-bar compilation compilation-recompile]
1165 '("Recompile" . recompile)) 1168 '("Recompile" . recompile))
1166 (define-key map [menu-bar compilation compilation-compile] 1169 (define-key map [menu-bar compilation compilation-compile]
1167 '("Compile..." . compile)) 1170 '("Compile..." . compile))
1168 map) 1171 map)