[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/highlight-parentheses 69c694a 30/49: Allow hl-paren- -[bac
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/highlight-parentheses 69c694a 30/49: Allow hl-paren- -[background-]colors, -attributes to be functions |
Date: |
Sun, 15 Aug 2021 03:57:47 -0400 (EDT) |
branch: elpa/highlight-parentheses
commit 69c694aca1fe71df1272f313e6e996f5cb773ee2
Author: Constantin Kulikov <zxnotdead@gmail.com>
Commit: Constantin Kulikov <zxnotdead@gmail.com>
Allow hl-paren- -[background-]colors, -attributes to be functions
---
highlight-parentheses.el | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/highlight-parentheses.el b/highlight-parentheses.el
index 60471bf..bdffd37 100644
--- a/highlight-parentheses.el
+++ b/highlight-parentheses.el
@@ -51,21 +51,21 @@
'("firebrick1" "IndianRed1" "IndianRed3" "IndianRed4")
"List of colors for the highlighted parentheses.
The list starts with the inside parentheses and moves outwards."
- :type '(repeat color)
+ :type '(choice (repeat color) function)
: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 inside parentheses and moves outwards."
- :type '(repeat color)
+ :type '(choice (repeat color) function)
:set 'hl-paren-set
:group 'highlight-parentheses)
(defcustom hl-paren-attributes nil
"List of face attributes for the highlighted parentheses.
The list starts with the inside parentheses and moves outwards."
- :type plist
+ :type '(choice plist function)
:set 'hl-paren-set
:group 'highlight-parentheses)
@@ -154,9 +154,15 @@ overlays when scrolling or moving point by pressing and
holding
;;; overlays
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun hl-paren-create-overlays ()
- (let ((fg hl-paren-colors)
- (bg hl-paren-background-colors)
- (attr hl-paren-attributes)
+ (let ((fg (if (functionp hl-paren-colors)
+ (funcall hl-paren-colors)
+ hl-paren-colors))
+ (bg (if (functionp hl-paren-background-colors)
+ (funcall hl-paren-background-colors)
+ hl-paren-background-colors))
+ (attr (if (functionp hl-paren-attributes)
+ (funcall hl-paren-attributes)
+ hl-paren-attributes))
attributes)
(while (or fg bg attr)
(setq attributes (face-attr-construct 'hl-paren-face))
- [nongnu] elpa/highlight-parentheses 3b4d2c6 46/49: Add .elpaignore, (continued)
- [nongnu] elpa/highlight-parentheses 3b4d2c6 46/49: Add .elpaignore, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses bef1bc2 14/49: Add configuration for travis-ci., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses e653594 15/49: Add README with travis build state., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses d421e15 17/49: Add globalized highlight-parentheses-mode, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 8869fba 21/49: Fix slowdown by moving overlays less often., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 5e1fa9d 22/49: Make overlays front-advancing, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 9b9137b 24/49: New defcustom: hl-paren-delay (see issue #12), ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses ebf8827 25/49: Fix Travis build incidator, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses c38885b 31/49: Merge pull request #18 from Bad-ptr/master, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 73b4aa7 34/49: Added angle brackets!, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 69c694a 30/49: Allow hl-paren- -[background-]colors, -attributes to be functions,
ELPA Syncer <=
- [nongnu] elpa/highlight-parentheses f0bd58c 35/49: Merge pull request #20 from tprk77/master, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 21fd617 41/49: Update README, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses b335e9e 49/49: Don't exclude README.md from ELPA package, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 59ff08a 23/49: Merge pull request #11 from tsdh/master, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses ba48dac 36/49: Remove deprecated cl.el, fix compiler/linter nag, version bump, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 72283a2 45/49: Add highlight-parentheses property to our overlays, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses d871467 43/49: Adapt URL to sr.ht, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 23fe07f 39/49: Add LICENSE and screenshot, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 9d8f351 44/49: Release 2.0.1, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 013ac29 38/49: Fix errors due to forgotten version in define-obsolete-function/variable-alias, ELPA Syncer, 2021/08/15