branch: externals/indent-bars
commit 6e2f93d1949fffc9eb7f6f88f744c7910ffa34aa
Author: JD Smith <[email protected]>
Commit: JD Smith <[email protected]>

    ib: improve docs and add shorthands
---
 indent-bars.el | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/indent-bars.el b/indent-bars.el
index f16ea493b6..2832e5cf64 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -1,4 +1,4 @@
-;;; indent-bars.el --- highlight indentation with bars -*- lexical-binding: t; 
-*-
+;;; indent-bars.el --- Highlight indentation with bars -*- lexical-binding: t; 
-*-
 ;; Copyright (C) 2023  J.D. Smith
 
 ;; Author: J.D. Smith
@@ -33,6 +33,28 @@
 ;; or space-based indentation.  In the terminal (or on request) it
 ;; uses vertical bar characters instead of stipple patterns.
 
+;; For Developers:
+;;
+;; To efficiently accommodate simultaneous alternative bar styling, we
+;; do two things:
+;;
+;;  1. Collect all the style related information (color, stipple
+;;     pattern, etc.) into a single struct, operating on one such
+;;     "current" style struct at a time.
+;;
+;;  2. Provide convenience functions for replicating "alternative"
+;;     custom variables the user can configure; see
+;;     `indent-bars--style'.  These variables can "inherit" nil or
+;;     omitted plist variables from their parent var.
+;;
+;; To temporarily alter the current style, it's enough to bind the
+;; variable `indent-bars-current-style' dynamically.
+;;
+;; Note the shorthand substitutions for style related prefixes (slot
+;; accessors and variable; see file-local-variables at the end):
+;; 
+;;    ibs/  => indent-bars-style-
+;;    ibcs  => indent-bars-current-style
 
 ;;; Code:
 ;;;; Requires
@@ -1162,3 +1184,6 @@ Adapted from `highlight-indentation-mode'."
 (provide 'indent-bars)
 
 ;;; indent-bars.el ends here
+;; Local Variables:
+;; read-symbol-shorthands: (("ibs/" . "indent-bars-style-") ("ibcs" . 
"indent-bars-current-style"))
+;; End:

Reply via email to