[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/highlight-parentheses 9b9137b 24/49: New defcustom: hl-par
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/highlight-parentheses 9b9137b 24/49: New defcustom: hl-paren-delay (see issue #12) |
Date: |
Sun, 15 Aug 2021 03:57:46 -0400 (EDT) |
branch: elpa/highlight-parentheses
commit 9b9137b0d454f3b73a3dc48cd3a7b2438855dd9b
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>
New defcustom: hl-paren-delay (see issue #12)
Also make hl-paren-timer buffer-local.
---
highlight-parentheses.el | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/highlight-parentheses.el b/highlight-parentheses.el
index 1159b0f..d1750e4 100644
--- a/highlight-parentheses.el
+++ b/highlight-parentheses.el
@@ -98,6 +98,7 @@ This is used to prevent analyzing the same context over and
over.")
(defvar hl-paren-timer nil
"A timer initiating the movement of the `hl-paren-overlays'.")
+(make-variable-buffer-local 'hl-paren-timer)
(defun hl-paren-highlight ()
"Highlight the parentheses around point."
@@ -118,11 +119,20 @@ This is used to prevent analyzing the same context over
and over.")
(dolist (ov overlays)
(move-overlay ov 1 1)))))
+(defcustom hl-paren-delay 0.137
+ "Fraction of seconds after which the `hl-paren-overlays' are adjusted.
+In general, this should at least be larger than your keyboard
+repeat rate in order to prevent excessive movements of the
+overlays when scrolling or moving point by pressing and holding
+\\[next-line], \\[scroll-up-command] and friends."
+ :type 'number
+ :group 'highlight-parentheses)
+
(defun hl-paren-initiate-highlight ()
- "Move the `hl-paren-overlays' after a short fraction of time."
+ "Move the `hl-paren-overlays' after a `hl-paren-delay' secs."
(when hl-paren-timer
(cancel-timer hl-paren-timer))
- (setq hl-paren-timer (run-at-time 0.23 nil #'hl-paren-highlight)))
+ (setq hl-paren-timer (run-at-time hl-paren-delay nil #'hl-paren-highlight)))
;;;###autoload
(define-minor-mode highlight-parentheses-mode
- [nongnu] elpa/highlight-parentheses a5eace2 32/49: Added option for highlighting adjacent parens., (continued)
- [nongnu] elpa/highlight-parentheses a5eace2 32/49: Added option for highlighting adjacent parens., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 891538d 48/49: Squash emacs 28 define-minor-mode warning; release 2.0.3, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses fdabfda 47/49: Remove cl-lib dependency since it's included in Emacs 24.3 anyhow; release 2.0.2, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 9a99a4b 42/49: Fix custom type error of highlight-parentheses-attributes, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 3b4d2c6 46/49: Add .elpaignore, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses bef1bc2 14/49: Add configuration for travis-ci., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses e653594 15/49: Add README with travis build state., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses d421e15 17/49: Add globalized highlight-parentheses-mode, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 8869fba 21/49: Fix slowdown by moving overlays less often., ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 5e1fa9d 22/49: Make overlays front-advancing, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 9b9137b 24/49: New defcustom: hl-paren-delay (see issue #12),
ELPA Syncer <=
- [nongnu] elpa/highlight-parentheses ebf8827 25/49: Fix Travis build incidator, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses c38885b 31/49: Merge pull request #18 from Bad-ptr/master, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 73b4aa7 34/49: Added angle brackets!, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 69c694a 30/49: Allow hl-paren- -[background-]colors, -attributes to be functions, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses f0bd58c 35/49: Merge pull request #20 from tprk77/master, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 21fd617 41/49: Update README, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses b335e9e 49/49: Don't exclude README.md from ELPA package, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 59ff08a 23/49: Merge pull request #11 from tsdh/master, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses ba48dac 36/49: Remove deprecated cl.el, fix compiler/linter nag, version bump, ELPA Syncer, 2021/08/15
- [nongnu] elpa/highlight-parentheses 72283a2 45/49: Add highlight-parentheses property to our overlays, ELPA Syncer, 2021/08/15