377 |
'(;; configure output lines. |
'(;; configure output lines. |
378 |
("^[Cc]hecking \\(?:[Ff]or \\|[Ii]f \\|[Ww]hether \\(?:to \\)?\\)?\\(.+\\)\\.\\.\\. *\\(?:(cached) *\\)?\\(\\(yes\\(?: .+\\)?\\)\\|no\\|\\(.*\\)\\)$" |
("^[Cc]hecking \\(?:[Ff]or \\|[Ii]f \\|[Ww]hether \\(?:to \\)?\\)?\\(.+\\)\\.\\.\\. *\\(?:(cached) *\\)?\\(\\(yes\\(?: .+\\)?\\)\\|no\\|\\(.*\\)\\)$" |
379 |
(1 font-lock-variable-name-face) |
(1 font-lock-variable-name-face) |
380 |
(2 font-lock-keyword-face)) |
(2 (compilation-text-face '(4 . 3)))) |
381 |
;; Command output lines. Recognize `make[n]:' lines too. |
;; Command output lines. Recognize `make[n]:' lines too. |
382 |
("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:" |
("^\\([[:alnum:]_/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:" |
383 |
(1 font-lock-function-name-face) (3 compilation-line-face nil t)) |
(1 font-lock-function-name-face) (3 compilation-line-face nil t)) |
384 |
(" --?o\\(?:utfile\\|utput\\)?[= ]?\\(\\S +\\)" . 1) |
(" --?o\\(?:utfile\\|utput\\)?[= ]?\\(\\S +\\)" . 1) |
385 |
("^Compilation finished" . font-lock-keyword-face) |
("^Compilation finished" . compilation-info-text-face) |
386 |
("^Compilation exited abnormally" . font-lock-keyword-face)) |
("^Compilation exited abnormally" . compilation-error-text-face)) |
387 |
"Additional things to highlight in Compilation mode. |
"Additional things to highlight in Compilation mode. |
388 |
This gets tacked on the end of the generated expressions.") |
This gets tacked on the end of the generated expressions.") |
389 |
|
|
468 |
;; History of compile commands. |
;; History of compile commands. |
469 |
(defvar compile-history nil) |
(defvar compile-history nil) |
470 |
|
|
471 |
|
(defface compilation-error |
472 |
|
'((t :inherit font-lock-warning-face)) |
473 |
|
"Face used to highlight compiler errors." |
474 |
|
:group 'font-lock-highlighting-faces |
475 |
|
:version "22.1") |
476 |
|
|
477 |
(defface compilation-warning |
(defface compilation-warning |
478 |
'((((class color) (min-colors 16)) (:foreground "Orange" :weight bold)) |
'((((class color) (min-colors 16)) (:foreground "Orange" :weight bold)) |
479 |
(((class color)) (:foreground "cyan" :weight bold)) |
(((class color)) (:foreground "cyan" :weight bold)) |
493 |
(:foreground "Green" :weight bold)) |
(:foreground "Green" :weight bold)) |
494 |
(((class color)) (:foreground "green" :weight bold)) |
(((class color)) (:foreground "green" :weight bold)) |
495 |
(t (:weight bold))) |
(t (:weight bold))) |
496 |
"Face used to highlight compiler warnings." |
"Face used to highlight compiler information." |
497 |
:group 'font-lock-highlighting-faces |
:group 'font-lock-highlighting-faces |
498 |
:version "22.1") |
:version "22.1") |
499 |
;; backward-compatibility alias |
;; backward-compatibility alias |
500 |
(put 'compilation-info-face 'face-alias 'compilation-info) |
(put 'compilation-info-face 'face-alias 'compilation-info) |
501 |
|
|
502 |
(defface compilation-error-file-name |
(defface compilation-error-file-name |
503 |
'((default :inherit font-lock-warning-face) |
'((default :inherit compilation-error) |
504 |
(((supports :underline t)) :underline t)) |
(((supports :underline t)) :underline t)) |
505 |
"Face for displaying file names in compilation errors." |
"Face for displaying file names in error messages." |
506 |
:group 'font-lock-highlighting-faces |
:group 'font-lock-highlighting-faces |
507 |
:version "22.1") |
:version "22.1") |
508 |
|
|
509 |
(defface compilation-warning-file-name |
(defface compilation-warning-file-name |
510 |
'((default :inherit font-lock-warning-face) |
'((default :inherit compilation-warning) |
511 |
(((supports :underline t)) :underline t)) |
(((supports :underline t)) :underline t)) |
512 |
"Face for displaying file names in compilation errors." |
"Face for displaying file names in warning messages." |
513 |
:group 'font-lock-highlighting-faces |
:group 'font-lock-highlighting-faces |
514 |
:version "22.1") |
:version "22.1") |
515 |
|
|
516 |
(defface compilation-info-file-name |
(defface compilation-info-file-name |
517 |
'((default :inherit compilation-info) |
'((default :inherit compilation-info) |
518 |
(((supports :underline t)) :underline t)) |
(((supports :underline t)) :underline t)) |
519 |
"Face for displaying file names in compilation errors." |
"Face for displaying file names in informational messages." |
520 |
:group 'font-lock-highlighting-faces |
:group 'font-lock-highlighting-faces |
521 |
:version "22.1") |
:version "22.1") |
522 |
|
|
523 |
(defface compilation-line-number |
(defface compilation-line-number |
524 |
'((default :inherit font-lock-variable-name-face) |
'((default :inherit font-lock-variable-name-face) |
525 |
(((supports :underline t)) :underline t)) |
(((supports :underline t)) :underline t)) |
526 |
"Face for displaying file names in compilation errors." |
"Face for displaying line numbers in compiler messages." |
527 |
:group 'font-lock-highlighting-faces |
:group 'font-lock-highlighting-faces |
528 |
:version "22.1") |
:version "22.1") |
529 |
|
|
530 |
(defface compilation-column-number |
(defface compilation-column-number |
531 |
'((default :inherit font-lock-type-face) |
'((default :inherit font-lock-type-face) |
532 |
(((supports :underline t)) :underline t)) |
(((supports :underline t)) :underline t)) |
533 |
"Face for displaying file names in compilation errors." |
"Face for displaying column numbers in compiler messages." |
534 |
:group 'font-lock-highlighting-faces |
:group 'font-lock-highlighting-faces |
535 |
:version "22.1") |
:version "22.1") |
536 |
|
|
543 |
(defvar compilation-error-face 'compilation-error-file-name |
(defvar compilation-error-face 'compilation-error-file-name |
544 |
"Face name to use for file name in error messages.") |
"Face name to use for file name in error messages.") |
545 |
|
|
546 |
|
(defvar compilation-error-text-face 'compilation-error |
547 |
|
"Face name to use for text of error messages.") |
548 |
|
|
549 |
(defvar compilation-warning-face 'compilation-warning-file-name |
(defvar compilation-warning-face 'compilation-warning-file-name |
550 |
"Face name to use for file name in warning messages.") |
"Face name to use for file name in warning messages.") |
551 |
|
|
552 |
|
(defvar compilation-warning-text-face 'compilation-warning |
553 |
|
"Face name to use for text of warning messages.") |
554 |
|
|
555 |
(defvar compilation-info-face 'compilation-info-file-name |
(defvar compilation-info-face 'compilation-info-file-name |
556 |
"Face name to use for file name in informational messages.") |
"Face name to use for file name in informational messages.") |
557 |
|
|
558 |
|
(defvar compilation-info-text-face 'compilation-info |
559 |
|
"Face name to use for text of informational messages.") |
560 |
|
|
561 |
(defvar compilation-line-face 'compilation-line-number |
(defvar compilation-line-face 'compilation-line-number |
562 |
"Face name to use for line number in message.") |
"Face name to use for line numbers in compiler message.") |
563 |
|
|
564 |
(defvar compilation-column-face 'compilation-column-number |
(defvar compilation-column-face 'compilation-column-number |
565 |
"Face name to use for column number in message.") |
"Face name to use for column numbers in compiler messages.") |
566 |
|
|
567 |
;; same faces as dired uses |
;; same faces as dired uses |
568 |
(defvar compilation-enter-directory-face 'font-lock-function-name-face |
(defvar compilation-enter-directory-face 'font-lock-function-name-face |
569 |
"Face name to use for column number in message.") |
"Face name to use for entering directory messages.") |
570 |
|
|
571 |
(defvar compilation-leave-directory-face 'font-lock-type-face |
(defvar compilation-leave-directory-face 'font-lock-type-face |
572 |
"Face name to use for column number in message.") |
"Face name to use for leaving directory messages.") |
573 |
|
|
574 |
|
|
575 |
|
|
585 |
(and (cdr type) (match-end (cdr type)) compilation-info-face) |
(and (cdr type) (match-end (cdr type)) compilation-info-face) |
586 |
compilation-error-face)) |
compilation-error-face)) |
587 |
|
|
588 |
|
(defun compilation-text-face (type) |
589 |
|
(or (and (car type) (match-end (car type)) compilation-warning-text-face) |
590 |
|
(and (cdr type) (match-end (cdr type)) compilation-info-text-face) |
591 |
|
compilation-error-text-face)) |
592 |
|
|
593 |
;; Internal function for calculating the text properties of a directory |
;; Internal function for calculating the text properties of a directory |
594 |
;; change message. The directory property is important, because it is |
;; change message. The directory property is important, because it is |
595 |
;; the stack of nested enter-messages. Relative filenames on the following |
;; the stack of nested enter-messages. Relative filenames on the following |