[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/flymake-popon cb66ecf122 2/8: Use different faces for diff
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/flymake-popon cb66ecf122 2/8: Use different faces for different diagnostic types |
Date: |
Sun, 22 May 2022 12:58:38 -0400 (EDT) |
branch: elpa/flymake-popon
commit cb66ecf122f24cb45fd99d2afb30d1e394a34971
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Use different faces for different diagnostic types
---
flymake-popon.el | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/flymake-popon.el b/flymake-popon.el
index 02287dd721..63fc7d19d5 100644
--- a/flymake-popon.el
+++ b/flymake-popon.el
@@ -87,6 +87,21 @@ The value should be in seconds."
'((t :inherit default))
"Default face for popon/posframe.")
+(defface flymake-popon-note
+ '((t :inherit compilation-info))
+ "Face for showing diagnotic of level :note."
+ :group 'capital)
+
+(defface flymake-popon-warning
+ '((t :inherit compilation-warning))
+ "Face for showing diagnotic of level :warning."
+ :group 'capital)
+
+(defface flymake-popon-error
+ '((t :inherit compilation-error))
+ "Face for showing diagnotic of level :error."
+ :group 'capital)
+
(defface flymake-popon-posframe-border
'((t :foreground "black"))
"Border face. Only foreground is used, others are ignored.")
@@ -101,8 +116,14 @@ The value should be in seconds."
"Format DIAGNOSTIC to text."
(with-temp-buffer
(insert
- (concat "* " (car (split-string (flymake-diagnostic-text diagnostic)
- "[\n\r]+"))))
+ "* "
+ (propertize
+ (car (split-string (flymake-diagnostic-text diagnostic) "[\n\r]+"))
+ 'face (plist-get (list :note 'flymake-popon-note
+ :warning 'flymake-popon-warning
+ :error 'flymake-popon-error)
+ (flymake-diagnostic-type diagnostic))))
+ (message "%S" (flymake-diagnostic-type diagnostic))
;; Break long lines.
(goto-char (point-min))
- [nongnu] branch elpa/flymake-popon created (now 288ce72ae6), ELPA Syncer, 2022/05/22
- [nongnu] elpa/flymake-popon 80e9f03e35 4/8: Remove unnecessary log message, ELPA Syncer, 2022/05/22
- [nongnu] elpa/flymake-popon cb66ecf122 2/8: Use different faces for different diagnostic types,
ELPA Syncer <=
- [nongnu] elpa/flymake-popon 3b7a9023cf 7/8: Fix typo, ELPA Syncer, 2022/05/22
- [nongnu] elpa/flymake-popon 51ed3f9c48 3/8: Add COPYING, ELPA Syncer, 2022/05/22
- [nongnu] elpa/flymake-popon cf39050dc6 5/8: Require compile for some faces, ELPA Syncer, 2022/05/22
- [nongnu] elpa/flymake-popon 288ce72ae6 8/8: Remove obsolete use of define-minor-mode, ELPA Syncer, 2022/05/22
- [nongnu] elpa/flymake-popon df877f3656 1/8: Add the package, ELPA Syncer, 2022/05/22
- [nongnu] elpa/flymake-popon 3c27c51038 6/8: Lower required Emacs version and elaborate README, ELPA Syncer, 2022/05/22