[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hl-block-mode 27e3ab4195 42/64: Cleanup: minor naming chan
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hl-block-mode 27e3ab4195 42/64: Cleanup: minor naming changes |
Date: |
Thu, 7 Jul 2022 12:00:08 -0400 (EDT) |
branch: elpa/hl-block-mode
commit 27e3ab4195c70cfb5983c8c56b369b887efd3144
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Cleanup: minor naming changes
---
hl-block-mode.el | 46 +++++++++++++++++++++++-----------------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/hl-block-mode.el b/hl-block-mode.el
index 8eb92b3004..57bf70ecda 100644
--- a/hl-block-mode.el
+++ b/hl-block-mode.el
@@ -74,31 +74,31 @@ Set to nil to use all brackets."
(defun hl-block--syntax-prev-bracket (pt)
"A version of `syntax-ppss' to match curly braces.
PT is typically the '(point)'."
- (let ((start (ignore-errors (elt (syntax-ppss pt) 1))))
- (when start
- (if (char-equal hl-block-bracket (char-after start))
- start
- (hl-block--syntax-prev-bracket (1- start))))))
+ (let ((beg (ignore-errors (elt (syntax-ppss pt) 1))))
+ (when beg
+ (if (char-equal hl-block-bracket (char-after beg))
+ beg
+ (hl-block--syntax-prev-bracket (1- beg))))))
(defun hl-block--find-all-ranges (pt)
"Return a list of ranges starting from PT, outer-most to inner-most."
(let*
(
- (start
+ (beg
;; find brackets
(if hl-block-bracket
(hl-block--syntax-prev-bracket pt)
(ignore-errors (elt (syntax-ppss pt) 1))))
(end
- (when start
- (or (ignore-errors (scan-sexps start 1)) pt)))
+ (when beg
+ (or (ignore-errors (scan-sexps beg 1)) pt)))
(range-prev
- (when start
- (hl-block--find-all-ranges start))))
- (when start
+ (when beg
+ (hl-block--find-all-ranges beg))))
+ (when beg
(if range-prev
- (cons (list start end) range-prev)
- (list (list start end))))))
+ (cons (list beg end) range-prev)
+ (list (list beg end))))))
(defun hl-block--find-all-ranges-or-fallback (pt)
"Return a list of ranges starting from PT, outer-most to inner-most (with
fallback)."
@@ -112,14 +112,14 @@ PT is typically the '(point)'."
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-bright (a b tint)
+(defun hl-block--color-tint-add (a b tint)
"Tint color lighter from A to B by TINT amount."
(vector
(+ (aref a 0) (* tint (aref b 0)))
(+ (aref a 1) (* tint (aref b 1)))
(+ (aref a 2) (* tint (aref b 2)))))
-(defun hl-block--color-tint-dark (a b tint)
+(defun hl-block--color-tint-sub (a b tint)
"Tint colors darker from A to B by TINT amount."
(vector
(- (aref a 0) (* tint (aref b 0)))
@@ -137,7 +137,7 @@ Inverse of `color-values'."
(when-let ((block-list (save-excursion
(hl-block--find-all-ranges-or-fallback (point)))))
(let*
(
- (start-prev (nth 0 (nth 0 block-list)))
+ (beg-prev (nth 0 (nth 0 block-list)))
(end-prev (nth 1 (nth 0 block-list)))
(block-list-len (length block-list))
(bg-color (apply 'vector (color-values (face-attribute 'default
:background))))
@@ -151,20 +151,20 @@ Inverse of `color-values'."
(let*
(
(i-tint (- block-list-len i))
- (start (nth 0 elem_range))
+ (beg (nth 0 elem_range))
(end (nth 1 elem_range))
- (elem-overlay-start (make-overlay start start-prev))
+ (elem-overlay-beg (make-overlay beg beg-prev))
(elem-overlay-end (make-overlay end-prev end))
(bg-color-blend
(hl-block--color-values-as-string
(if do-highlight
- (hl-block--color-tint-bright bg-color bg-color-tint i-tint)
- (hl-block--color-tint-dark bg-color bg-color-tint i-tint)))))
- (overlay-put elem-overlay-start 'face `(:background ,bg-color-blend
:extend t))
+ (hl-block--color-tint-add bg-color bg-color-tint i-tint)
+ (hl-block--color-tint-sub bg-color bg-color-tint i-tint)))))
+ (overlay-put elem-overlay-beg 'face `(:background ,bg-color-blend
:extend t))
(overlay-put elem-overlay-end 'face `(:background ,bg-color-blend
:extend t))
- (push elem-overlay-start hl-block-overlay)
+ (push elem-overlay-beg hl-block-overlay)
(push elem-overlay-end hl-block-overlay)
- (setq start-prev start)
+ (setq beg-prev beg)
(setq end-prev end))
(setq i (1+ i))))))
- [nongnu] elpa/hl-block-mode d47c372b06 03/64: Update readme.rst, (continued)
- [nongnu] elpa/hl-block-mode d47c372b06 03/64: Update readme.rst, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode f763fff94e 09/64: Follow lisp and emacs-lisp conventions, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode b98c83d8cb 14/64: Add global-hl-block-mode, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 326e026b66 13/64: Use character literal for '{', ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 9f39593c4f 19/64: make hl-bock-mode lighter customizable, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 00914d2938 22/64: Reduce default delay to 200ms, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 74b5a89360 23/64: FIx typo, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 0f1abe46d5 27/64: Apply auto-format, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 59cdbd4d27 39/64: Use "push" instead of add-to-list, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 0ea43d3202 34/64: Cleanup: disable auto-load for internal function, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 27e3ab4195 42/64: Cleanup: minor naming changes,
ELPA Syncer <=
- [nongnu] elpa/hl-block-mode 59458a4b2b 54/64: Initialize brackets from the syntax table, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 81c692d654 55/64: Cleanup: define a group with defgroup, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode a165ce51fb 56/64: Fix bracket draw style highlighting point-min/max, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 5f532fef33 12/64: Cleanup: indentation, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 6a8f871d7a 28/64: Add .elisp-autofmt to enable auto-formatting, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode c85c9335f7 07/64: Cleanup: warnings, docs, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 6dc75e71b0 29/64: Fix global-hl-block-mode activating with the minibuffer, ELPA Syncer, 2022/07/07
- [nongnu] elpa/hl-block-mode 6c74034246 30/64: Update URL, ELPA Syncer, 2022/07/07
- [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