[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hl-block-mode 0ea43d3202 34/64: Cleanup: disable auto-load
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hl-block-mode 0ea43d3202 34/64: Cleanup: disable auto-load for internal function |
Date: |
Thu, 7 Jul 2022 12:00:07 -0400 (EDT) |
branch: elpa/hl-block-mode
commit 0ea43d320219ba4e6b7b1be36a5c1533ac3edb42
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Cleanup: disable auto-load for internal function
---
hl-block-mode.el | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/hl-block-mode.el b/hl-block-mode.el
index ba5a060d95..0c61fd2236 100644
--- a/hl-block-mode.el
+++ b/hl-block-mode.el
@@ -142,6 +142,12 @@ Inverse of `color-values'."
;; Timer
(defvar hl-block--delay-timer nil)
+(defun hl-block--overlay-refresh-from-timer ()
+ "Ensure this mode has not been disabled before highlighting.
+This can happen when switching buffers."
+ (when hl-block-mode
+ (hl-block--overlay-refresh)))
+
(defun hl-block--overlay-delay ()
"Recalculate overlays using a delay (to avoid slow-down)."
(when (timerp hl-block--delay-timer)
@@ -160,6 +166,11 @@ Inverse of `color-values'."
(cancel-timer hl-block--delay-timer))
(remove-hook 'post-command-hook #'hl-block--overlay-delay t))
+(defun hl-block-mode-turn-on ()
+ "Enable command `hl-block-mode'."
+ (when (and (not (minibufferp)) (not hl-block-mode))
+ (hl-block-mode 1)))
+
;;;###autoload
(define-minor-mode hl-block-mode
"Highlight block under the cursor."
@@ -175,24 +186,12 @@ Inverse of `color-values'."
(jit-lock-unregister 'hl-block-mode-enable)
(hl-block-mode-disable))))
-(defun hl-block--overlay-refresh-from-timer ()
- "Ensure this mode has not been disabled before highlighting.
-This can happen when switching buffers."
- (when hl-block-mode
- (hl-block--overlay-refresh)))
-
;;;###autoload
(define-globalized-minor-mode
global-hl-block-mode
- hl-block-mode
- hl-block-mode-turn-on
- :group 'hl-block-mode)
-;;;###autoload
-(defun hl-block-mode-turn-on ()
- "Enable command `hl-block-mode'."
- (when (and (not (minibufferp)) (not hl-block-mode))
- (hl-block-mode 1)))
+ hl-block-mode hl-block-mode-turn-on
+ :group 'hl-block-mode)
(provide 'hl-block-mode)
;; Local Variables:
- [nongnu] elpa/hl-block-mode 4e28df960d 40/64: Remove local variables when disabling the mode, (continued)
- [nongnu] elpa/hl-block-mode 4e28df960d 40/64: Remove local variables when disabling the mode, ELPA Syncer, 2022/07/07
- [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 <=
- [nongnu] elpa/hl-block-mode 27e3ab4195 42/64: Cleanup: minor naming changes, ELPA Syncer, 2022/07/07
- [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