[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/indent-bars 4fa1058326 293/431: Never recreate the same
From: |
ELPA Syncer |
Subject: |
[elpa] externals/indent-bars 4fa1058326 293/431: Never recreate the same style TAG |
Date: |
Mon, 16 Sep 2024 12:59:40 -0400 (EDT) |
branch: externals/indent-bars
commit 4fa105832638fed11776d3c9642ec8108582d04f
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>
Never recreate the same style TAG
---
indent-bars.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/indent-bars.el b/indent-bars.el
index 1911e72c1e..8bb0da54aa 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -551,10 +551,13 @@ Additional `format' arguments can be passed as R."
(if (ibs/tag s) (concat "-" (ibs/tag s)) "") r)))
(defun indent-bars--new-style (&optional tag)
- "Create and record a new style struct with TAG."
- (let ((style (ibs/create tag)))
- (cl-pushnew style indent-bars--styles :test #'equal)
- style))
+ "Create and record a new style struct with TAG.
+A new style is only created if an existing style with that TAG is
+no yet recorded."
+ (or (seq-find (lambda (s) (eq (ibs/tag s) tag)) indent-bars--styles)
+ (let ((style (ibs/create tag)))
+ (cl-pushnew style indent-bars--styles :test #'equal)
+ style)))
;;;;; Colors
(defun indent-bars--main-color (style &optional tint tint-blend blend-override)
@@ -837,7 +840,8 @@ returned."
"Reset all styles' colors and faces.
Useful for calling after theme changes."
(interactive)
- (dolist (s indent-bars--styles) (indent-bars--initialize-style s)))
+ (dolist (s indent-bars--styles)
+ (indent-bars--initialize-style s)))
(defun indent-bars--initialize-style (style)
"Initialize STYLE."
- [elpa] externals/indent-bars 748ffeec7f 276/431: New highlight-method, including 'context (new default), (continued)
- [elpa] externals/indent-bars 748ffeec7f 276/431: New highlight-method, including 'context (new default), ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars ffaaae3d42 265/431: Remove styles on reset so that are recomputed, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars f5f0392ab6 254/431: window-change: remap even if whr val unchanged, use remap-cleanup, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars ceb2eb00e9 266/431: ppss-based no-descend-string/list, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 62d4a834b7 282/431: Restore use of base stipple-face-spec, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars d7af7b3d42 283/431: Restore unspecified for "parent decides" config, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 247b35f55d 286/431: on-bar tweaks and doc improvements, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars f80c712b37 288/431: update-current-depth-highlight: reindent, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 9d374e0650 291/431: Fix timer teardown and run-hooks (which takes a hook name), ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 8d8b0b964b 292/431: Do not test bol but point to skip scope update, simplify markers, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 4fa1058326 293/431: Never recreate the same style TAG,
ELPA Syncer <=
- [elpa] externals/indent-bars 86113c74ee 298/431: docs: minor tweaks, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 71b787c7d0 294/431: display: goto BEG prior to checking indentation depth, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars b433c5ca4d 308/431: TS: add developer note, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 4d1e7db294 309/431: TS: remove debug message, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars e20ba1caea 304/431: Improve README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 8cccb685b1 305/431: Update README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 7a1413cb15 314/431: Ensure buffer-local idle timers run in the original buffer, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars adbf859e2d 323/431: Update README.md — blank spacer, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 21f6242b24 321/431: Update README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 751db47d31 341/431: Update README.md, ELPA Syncer, 2024/09/16