[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/flymake-popon 9b8045c0fc 1/3: Don't reinvent the wheel: ge
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/flymake-popon 9b8045c0fc 1/3: Don't reinvent the wheel: get the face from Flymake |
Date: |
Mon, 24 Oct 2022 02:58:35 -0400 (EDT) |
branch: elpa/flymake-popon
commit 9b8045c0fc52f958d4476fe9b0cab835a32b377f
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Don't reinvent the wheel: get the face from Flymake
---
flymake-popon.el | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/flymake-popon.el b/flymake-popon.el
index 253425c1cf..8f6a9f1403 100644
--- a/flymake-popon.el
+++ b/flymake-popon.el
@@ -99,14 +99,6 @@ The value should be in seconds."
(defvar flymake-popon--timer nil
"Timer to show popon.")
-(defun flymake-popon--get-face-for-diagnostic (diagnostic)
- "Get appropiate face for showing DIAGNOSTIC."
- (and-let* ((category (get (flymake-diagnostic-type diagnostic)
- 'flymake-category))
- ((symbolp category))
- ((or (get category 'flymake-popon-face)
- (get category 'mode-line-face))))))
-
(defun flymake-popon-format-diagnostic (diagnostic)
"Format DIAGNOSTIC to text."
(with-temp-buffer
@@ -115,7 +107,8 @@ The value should be in seconds."
(propertize
(car (split-string (flymake-diagnostic-text diagnostic)
"[\n\r]"))
- 'face (flymake-popon--get-face-for-diagnostic diagnostic)))
+ 'face (flymake--lookup-type-property
+ (flymake-diagnostic-type diagnostic) 'mode-line-face)))
;; Break long lines.
(goto-char (point-min))