[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hl-block-mode bd54144b34 49/64: Cleanup: re-organize secti
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hl-block-mode bd54144b34 49/64: Cleanup: re-organize sections |
Date: |
Thu, 7 Jul 2022 12:00:08 -0400 (EDT) |
branch: elpa/hl-block-mode
commit bd54144b344ef5f81fab7565c1677e8d8e3f1693
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Cleanup: re-organize sections
---
hl-block-mode.el | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/hl-block-mode.el b/hl-block-mode.el
index d6edeea26b..1ad5dad6f8 100644
--- a/hl-block-mode.el
+++ b/hl-block-mode.el
@@ -96,8 +96,9 @@ Useful for languages that use S-expressions to avoid overly
nested highlighting.
(defvar-local hl-block-overlay nil)
+
;; ---------------------------------------------------------------------------
-;; Internal Functions/Macros
+;; Internal Bracket Functions
(defun hl-block--syntax-prev-bracket (pt)
"A version of `syntax-ppss' to match curly braces.
@@ -155,11 +156,15 @@ The point will only ever be moved backward."
(setq end (ignore-errors (scan-sexps beg 1)))))))
+;; ---------------------------------------------------------------------------
+;; Internal Color Tint (Draw Style)
+
(defun hl-block--color-values-as-string (color)
"Build a color from COLOR.
Inverse of `color-values'."
(format "#%02x%02x%02x" (ash (aref color 0) -8) (ash (aref color 1) -8) (ash
(aref color 2) -8)))
+
(defun hl-block--color-tint-add (a b tint)
"Tint color lighter from A to B by TINT amount."
(vector
@@ -167,6 +172,7 @@ Inverse of `color-values'."
(+ (aref a 1) (* tint (aref b 1)))
(+ (aref a 2) (* tint (aref b 2)))))
+
(defun hl-block--color-tint-sub (a b tint)
"Tint colors darker from A to B by TINT amount."
(vector
@@ -174,11 +180,6 @@ Inverse of `color-values'."
(- (aref a 1) (* tint (aref b 1)))
(- (aref a 2) (* tint (aref b 2)))))
-(defun hl-block--overlay-clear ()
- "Clear all overlays."
- (mapc 'delete-overlay hl-block-overlay)
- (setq hl-block-overlay nil))
-
(defun hl-block--overlay-create-color-tint (block-list)
"Update the overlays based on the cursor location.
@@ -222,6 +223,9 @@ Argument BLOCK-LIST represents start-end ranges of braces."
(setq i (1+ i)))))))
+;; ---------------------------------------------------------------------------
+;; Internal Color Tint (Draw Style)
+
(defun hl-block--overlay-create-bracket (block-list)
"Update the overlays based on the cursor location.
Argument BLOCK-LIST represents start-end ranges of braces."
@@ -238,6 +242,15 @@ Argument BLOCK-LIST represents start-end ranges of braces."
(push elem-overlay-beg hl-block-overlay)))))
+;; ---------------------------------------------------------------------------
+;; Internal Refresh Function
+
+(defun hl-block--overlay-clear ()
+ "Clear all overlays."
+ (mapc 'delete-overlay hl-block-overlay)
+ (setq hl-block-overlay nil))
+
+
(defun hl-block--overlay-refresh ()
"Update the overlays based on the cursor location."
(hl-block--overlay-clear)
- [nongnu] elpa/hl-block-mode 717b4f743c 33/64: Cleanup: use group for hl-block-mode, (continued)
- [nongnu] elpa/hl-block-mode 717b4f743c 33/64: Cleanup: use group for hl-block-mode, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 618c0a78ef 53/64: Correct bracket face, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode b2f1c058be 61/64: Cleanup: remove redundant group, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 0593a1a77d 62/64: Cleanup: docstrings, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 9c5ee70df6 17/64: Cleanup: checkdoc warnings, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 83059c1050 18/64: Cleanup: use package prefix, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 047f9a972c 20/64: fix byte-compile nag, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 05a8c5119c 32/64: readme: link to melpa, tweaks to syntax highlighting, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 72840769e9 37/64: Cleanup: remove use of 'post-command-hook', ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 4a73d23ae2 43/64: Cleanup: over wide doc-string, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode bd54144b34 49/64: Cleanup: re-organize sections,
ELPA Syncer <=
- [nongnu] elpa/hl-block-mode 333490cf2d 45/64: Add hl-block-multi-line option, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 3c49f80ada 50/64: Cleanup: replace 'if' with 'cond', ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode f2ec1f167a 46/64: Correct type of hl-block-color-tint, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 2fb1cc165b 57/64: Simplify local bracket variable use, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 7e0452c768 64/64: Change URL to codeberg, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode a1c03970a0 59/64: Remove unnecessary requirement `seq`, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode d7e274c3f1 04/64: Update readme.rst, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode e7b5b014c9 10/64: Fix: localize hook & timer running when it shouldn't, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 28c9950a90 25/64: Fix for emacs 27, change in line highlighting, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode c6341f404e 44/64: Cleanup: store range data in cons cells instead of lists, ELPA Syncer, 2022/07/07