[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/eglot-inactive-regions 5ac127713d: hooks on refresh and cl
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/eglot-inactive-regions 5ac127713d: hooks on refresh and cleanup |
Date: |
Tue, 17 Dec 2024 01:00:32 -0500 (EST) |
branch: elpa/eglot-inactive-regions
commit 5ac127713db77c390cd9ffe7237c9c8d90d6b0af
Author: Filippo Argiolas <filippo.argiolas@gmail.com>
Commit: Filippo Argiolas <filippo.argiolas@gmail.com>
hooks on refresh and cleanup
---
eglot-inactive-regions.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/eglot-inactive-regions.el b/eglot-inactive-regions.el
index ad8e71b0ac..e9c8be4ee6 100644
--- a/eglot-inactive-regions.el
+++ b/eglot-inactive-regions.el
@@ -99,6 +99,9 @@ Background color is dynamically computed by blending current
theme
background and foreground colors with `eglot-inactive-regions-shading'
factor. All other face attributes you can customize.")
+(defvar eglot-inactive-regions-refresh-hook '())
+(defvar eglot-inactive-regions-cleanup-hook '())
+
(defvar-local eglot-inactive-regions--overlays '())
(setq-default eglot-inactive-regions--overlays '())
(defvar-local eglot-inactive-regions--ranges '())
@@ -167,6 +170,7 @@ factor."
(setq eglot-inactive-regions--overlays '())
(with-silent-modifications
(remove-text-properties (point-min) (point-max) '(eglot-inactive-region
nil)))
+ (run-hooks 'eglot-inactive-regions-cleanup-hook)
(font-lock-flush)))
(defun eglot-inactive-regions--get-face (pos)
@@ -271,7 +275,8 @@ Useful to update colors after a face or theme change."
('shade-background
(let ((ov (make-overlay beg (1+ end))))
(overlay-put ov 'face 'eglot-inactive-regions-shade-face)
- (push ov eglot-inactive-regions--overlays))))))))
+ (push ov eglot-inactive-regions--overlays))))
+ (run-hook-with-args 'eglot-inactive-regions-refresh-hook beg end)))))
(defun eglot-inactive-regions-refresh-all ()
"Refresh all buffers where this mode is enabled."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/eglot-inactive-regions 5ac127713d: hooks on refresh and cleanup,
ELPA Syncer <=