aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/compile.el57
1 files changed, 10 insertions, 47 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index b7b14c238b3..6d5acfcbdf4 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -377,13 +377,13 @@ you may also want to change `compilation-page-delimiter'.")
377 '(;; configure output lines. 377 '(;; configure output lines.
378 ("^[Cc]hecking \\(?:[Ff]or \\|[Ii]f \\|[Ww]hether \\(?:to \\)?\\)?\\(.+\\)\\.\\.\\. *\\(?:(cached) *\\)?\\(\\(yes\\(?: .+\\)?\\)\\|no\\|\\(.*\\)\\)$" 378 ("^[Cc]hecking \\(?:[Ff]or \\|[Ii]f \\|[Ww]hether \\(?:to \\)?\\)?\\(.+\\)\\.\\.\\. *\\(?:(cached) *\\)?\\(\\(yes\\(?: .+\\)?\\)\\|no\\|\\(.*\\)\\)$"
379 (1 font-lock-variable-name-face) 379 (1 font-lock-variable-name-face)
380 (2 (compilation-text-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 finished" . compilation-info-text-face) 385 ("^Compilation finished" . compilation-info-face)
386 ("^Compilation exited abnormally" . compilation-error-text-face)) 386 ("^Compilation exited abnormally" . compilation-error-face))
387 "Additional things to highlight in Compilation mode. 387 "Additional things to highlight in Compilation mode.
388This gets tacked on the end of the generated expressions.") 388This gets tacked on the end of the generated expressions.")
389 389
@@ -499,67 +499,35 @@ starting the compilation process.")
499;; backward-compatibility alias 499;; backward-compatibility alias
500(put 'compilation-info-face 'face-alias 'compilation-info) 500(put 'compilation-info-face 'face-alias 'compilation-info)
501 501
502(defface compilation-error-file-name
503 '((default :inherit compilation-error)
504 (((supports :underline t)) :underline t))
505 "Face for displaying file names in error messages."
506 :group 'font-lock-highlighting-faces
507 :version "22.1")
508
509(defface compilation-warning-file-name
510 '((default :inherit compilation-warning)
511 (((supports :underline t)) :underline t))
512 "Face for displaying file names in warning messages."
513 :group 'font-lock-highlighting-faces
514 :version "22.1")
515
516(defface compilation-info-file-name
517 '((default :inherit compilation-info)
518 (((supports :underline t)) :underline t))
519 "Face for displaying file names in informational messages."
520 :group 'font-lock-highlighting-faces
521 :version "22.1")
522
523(defface compilation-line-number 502(defface compilation-line-number
524 '((default :inherit font-lock-variable-name-face) 503 '((t :inherit font-lock-variable-name-face))
525 (((supports :underline t)) :underline t))
526 "Face for displaying line numbers in compiler messages." 504 "Face for displaying line numbers in compiler messages."
527 :group 'font-lock-highlighting-faces 505 :group 'font-lock-highlighting-faces
528 :version "22.1") 506 :version "22.1")
529 507
530(defface compilation-column-number 508(defface compilation-column-number
531 '((default :inherit font-lock-type-face) 509 '((t :inherit font-lock-type-face))
532 (((supports :underline t)) :underline t))
533 "Face for displaying column numbers in compiler messages." 510 "Face for displaying column numbers in compiler messages."
534 :group 'font-lock-highlighting-faces 511 :group 'font-lock-highlighting-faces
535 :version "22.1") 512 :version "22.1")
536 513
537(defvar compilation-message-face nil 514(defvar compilation-message-face 'underline
538 "Face name to use for whole messages. 515 "Face name to use for whole messages.
539Faces `compilation-error-face', `compilation-warning-face', 516Faces `compilation-error-face', `compilation-warning-face',
540`compilation-info-face', `compilation-line-face' and 517`compilation-info-face', `compilation-line-face' and
541`compilation-column-face' get prepended to this, when applicable.") 518`compilation-column-face' get prepended to this, when applicable.")
542 519
543(defvar compilation-error-face 'compilation-error-file-name 520(defvar compilation-error-face 'compilation-error
544 "Face name to use for file name in error messages.") 521 "Face name to use for file name in error messages.")
545 522
546(defvar compilation-error-text-face 'compilation-error 523(defvar compilation-warning-face 'compilation-warning
547 "Face name to use for text of error messages.")
548
549(defvar compilation-warning-face 'compilation-warning-file-name
550 "Face name to use for file name in warning messages.") 524 "Face name to use for file name in warning messages.")
551 525
552(defvar compilation-warning-text-face 'compilation-warning 526(defvar compilation-info-face 'compilation-info
553 "Face name to use for text of warning messages.")
554
555(defvar compilation-info-face 'compilation-info-file-name
556 "Face name to use for file name in informational messages.") 527 "Face name to use for file name in informational messages.")
557 528
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 529(defvar compilation-line-face 'compilation-line-number
562 "Face name to use for line numbers in compiler message.") 530 "Face name to use for line numbers in compiler messages.")
563 531
564(defvar compilation-column-face 'compilation-column-number 532(defvar compilation-column-face 'compilation-column-number
565 "Face name to use for column numbers in compiler messages.") 533 "Face name to use for column numbers in compiler messages.")
@@ -585,11 +553,6 @@ Faces `compilation-error-face', `compilation-warning-face',
585 (and (cdr type) (match-end (cdr type)) compilation-info-face) 553 (and (cdr type) (match-end (cdr type)) compilation-info-face)
586 compilation-error-face)) 554 compilation-error-face))
587 555
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 556;; Internal function for calculating the text properties of a directory
594;; change message. The directory property is important, because it is 557;; change message. The directory property is important, because it is
595;; the stack of nested enter-messages. Relative filenames on the following 558;; the stack of nested enter-messages. Relative filenames on the following