[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/highlight-parentheses 9088ba4 04/49: Added setter for colo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/highlight-parentheses 9088ba4 04/49: Added setter for colors. |
Date: |
Sun, 15 Aug 2021 03:57:42 -0400 (EDT) |
branch: elpa/highlight-parentheses
commit 9088ba4ceb1df9eeb28196442e941e43260fe1a3
Author: Nikolaj Schumacher <git@nschum.de>
Commit: Nikolaj Schumacher <git@nschum.de>
Added setter for colors.
---
highlight-parentheses.el | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/highlight-parentheses.el b/highlight-parentheses.el
index f445819..e02c05e 100644
--- a/highlight-parentheses.el
+++ b/highlight-parentheses.el
@@ -32,6 +32,8 @@
;;
;;; Change Log:
;;
+;; Added setter for color variables.
+;;
;; 2007-07-30 (1.0)
;; Added background highlighting and faces.
;;
@@ -50,21 +52,24 @@
:group 'faces
:group 'matching)
-(defvar hl-paren-overlays nil
- "This buffers currently active overlays.")
-(make-variable-buffer-local 'hl-paren-overlays)
+(defun hl-paren-set (variable value)
+ (set variable value)
+ (when (fboundp 'hl-paren-color-update)
+ (hl-paren-color-update)))
(defcustom hl-paren-colors
- '("firebrick1" "IndianRed4" "IndianRed")
+ '("firebrick1" "IndianRed1" "IndianRed3" "IndianRed4")
"*List of colors for the highlighted parentheses.
The list starts with the the inside parentheses and moves outwards."
:type '(repeat color)
+ :set 'hl-paren-set
:group 'highlight-parentheses)
(defcustom hl-paren-background-colors nil
"*List of colors for the background highlighted parentheses.
The list starts with the the inside parentheses and moves outwards."
:type '(repeat color)
+ :set 'hl-paren-set
:group 'highlight-parentheses)
(defface hl-paren-face nil
@@ -136,6 +141,16 @@ This is used to prevent analyzing the same context over
and over.")
(overlay-put (car hl-paren-overlays) 'face attributes)))
(setq hl-paren-overlays (nreverse hl-paren-overlays))))
+(defun hl-paren-color-update ()
+ (dolist (buffer (buffer-list))
+ (with-current-buffer buffer
+ (when hl-paren-overlays
+ (mapc 'delete-overlay hl-paren-overlays)
+ (setq hl-paren-overlays nil)
+ (hl-paren-create-overlays)
+ (let ((hl-paren-last-point -1)) ;; force update
+ (hl-paren-highlight))))))
+
(provide 'highlight-parentheses)
;;; highlight-parentheses.el ends here
- [nongnu] branch elpa/highlight-parentheses created (now b335e9e), ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 77e17d2 01/49: Import of version 0.9.1., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses b7e748e 02/49: Import of version 1.0., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 9088ba4 04/49: Added setter for colors.,
ELPA Syncer <=
- [nongnu] elpa/highlight-parentheses 6e688c5 05/49: Added compatibility info for Emacs 23., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses b9fe4eb 03/49: Rewrote engine., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 829cc57 07/49: Kill correct local variable., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses ce95ed5 08/49: Fixed bug causing last color not to be displayed., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 02cb984 11/49: Clean up doc strings., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 22ec446 12/49: (Finally) Bump version to 1.0.2., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 4d1a1cb 06/49: Bumped version to 1.0.1., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 315a901 09/49: Add dir-locals file with code style settings., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 22719ca 10/49: Add Emacs 24 to compatibility list., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 7b4ba71 19/49: Add autoload marker for global mode., ELPA Syncer, 2021/08/15