[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/indent-bars d7af7b3d42 283/431: Restore unspecified for
From: |
ELPA Syncer |
Subject: |
[elpa] externals/indent-bars d7af7b3d42 283/431: Restore unspecified for "parent decides" config |
Date: |
Mon, 16 Sep 2024 12:59:39 -0400 (EDT) |
branch: externals/indent-bars
commit d7af7b3d42ff8157d5cb5157e777f0d91727ec2a
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>
Restore unspecified for "parent decides" config
---
indent-bars.el | 41 ++++++++++++++++++++---------------------
1 file changed, 20 insertions(+), 21 deletions(-)
diff --git a/indent-bars.el b/indent-bars.el
index f29ab7dfef..bf01b20b5a 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -723,14 +723,8 @@ If ADD-INHERIT is non-nil, expand the type to a cons:
(inherit . type)
-the former based on the value of NO-INHERIT. ADD-INHERIT makes
-sense only for composite types with multiple underlying options,
-some of which can be omitted (e.g. plists).
-
-By default, all variables are configured to inherit unspecified
-or omitted underlying options from their composite parent
-variable. If NO-INHERIT is non-nil, the variable will be
-configured not to inherit any missing values.
+where INHERIT is either \\='inherit or \\='no-inherit, depending
+on the value of NO-INHERIT.
Additional `defcustom` keyword arguments can be given as R."
(require 'cus-edit)
@@ -739,17 +733,21 @@ Additional `defcustom` keyword arguments can be given as
R."
(symname (concat "indent-bars-" optname))
(sym (intern (concat "indent-bars-" optname)))
(tsym (intern (concat "indent-bars-" alt "-" optname)))
- (type (custom-variable-type sym)))
- ;; Add an unspecified choice to all choices
- (let ((unspec `(const :tag ,(concat "No-value (use parent " optname ")")
- unspecified))
- (rest type))
- (if (eq (car type) 'choice)
- (progn ; add a choice option
- (when-let ((tag-pos (member :tag type)))
- (setq rest (cdr tag-pos))) ;after tag
- (setcdr rest (push unspec (cdr rest))))
- (setq type `(choice ,unspec ,type))))
+ (type (custom-variable-type sym))
+ (choice (cond ((eq (car type) 'choice) type)
+ ((eq (car type) 'list)
+ (seq-find
+ (lambda (el) (and (consp el) (eq (car el) 'choice)))
+ type)))))
+ ;; Add an unspecified choice
+ (when choice
+ (when-let ((tag-pos (member :tag choice)))
+ (setq choice (cdr tag-pos))) ;after tag
+ (setcdr choice
+ (push
+ `(const :tag ,(concat "No-value (use parent " optname ")")
unspecified)
+ (cdr choice))))
+
;; Add leading inherit flag, if needed
(when (or no-inherit add-inherit)
(setq type
@@ -895,16 +893,17 @@ Skips any fully blank lines."
(goto-char p))))
(defvar indent-bars--update-depth-function nil)
+(defvar indent-bars--ppss nil)
(defun indent-bars--current-indentation-depth (&optional on-bar)
"Calculate current indentation depth.
If ON-BAR is nil, return the depth of the last visible bar on the
line. If ON-BAR is non-nil and content begins at a column where
a bar would otherwise have fallen, report the depth of
-that (undrawn) bar. If ON-BAR is the symbol \\='context and
+that (undrawn) bar. If ON-BAR is the symbol \\='context, and the
first non-blank line immediately above or below the current line
is not at a deeper indentation level (by at least one bar
spacing), disable on-bar and use the last-visible-bar depth for
-that line.
+that line instead.
If `indent-bars-no-descend-string' is non-nil and point at line
beginning is inside a string, do not add bars deeper than one
- [elpa] externals/indent-bars 6d59b8ff3b 272/431: Merge branch 'main' into treesit-scope, (continued)
- [elpa] externals/indent-bars 6d59b8ff3b 272/431: Merge branch 'main' into treesit-scope, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 12204b155b 278/431: Use indent-bars group for everything (with sub-groups), ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 0df7ac5ce5 269/431: Supply correct arguments to handle-blank-lines, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 770d2c7066 251/431: New: text-scale and schedule-remap-cleanup, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars bbc97b6c04 277/431: reset-styles for theme change, all face setup now via styles, ELPA Syncer, 2024/09/16
- [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 <=
- [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, 2024/09/16
- [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