[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-goggles 761abb7b2f 145/225: Hint duration should be c
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-goggles 761abb7b2f 145/225: Hint duration should be configured via three variables |
Date: |
Wed, 12 Jan 2022 08:59:03 -0500 (EST) |
branch: elpa/evil-goggles
commit 761abb7b2f1f642f2d7c73f4cce30bc8360320af
Author: Evgeni Kolev <evgenysw@gmail.com>
Commit: Evgeni Kolev <evgenysw@gmail.com>
Hint duration should be configured via three variables
---
evil-goggles.el | 34 ++++++++++++++++++++++------------
1 file changed, 22 insertions(+), 12 deletions(-)
diff --git a/evil-goggles.el b/evil-goggles.el
index 832714d9f1..e2aa3d69d2 100644
--- a/evil-goggles.el
+++ b/evil-goggles.el
@@ -49,18 +49,28 @@
(require 'cl-lib)
(defcustom evil-goggles-duration 0.200
- "Time in floating seconds that the goggles overlay should last.
+ "Time in floating seconds the goggles hint should last.
-This affects the hints which are displayed before the operation, such
-as when deleting."
+See also `evil-goggles-async-duration' and `evil-goggles-blocking-duration'."
:type 'number
:group 'evil-goggles)
-;; TODO better name
-(defcustom evil-goggles-duration2 0.200
- "Time in floating seconds that the goggles overlay should last.
+(defcustom evil-goggles-async-duration nil
+ "Time in floating seconds the async goggles hint should last.
-This affects the hints which are displayed before the operation"
+If nil, the value of `evil-goggles-duration' will be used.
+
+This affects the hints which are displayed before the operation."
+ :type 'number
+ :group 'evil-goggles)
+
+(defcustom evil-goggles-blocking-duration nil
+ "Time in floating seconds the blocking goggles hint should last.
+
+If nil, the value of `evil-goggles-duration' will be used.
+
+This affects the hints which are displayed before the operation, when
+the operation is executed after the hint disappears."
:type 'number
:group 'evil-goggles)
@@ -155,11 +165,11 @@ convention for the insert-behind-hooks overlay property."
"Show hint from BEG to END with face FACE for DUR sec, do BODY with hint on.
BODY is executed after the hint is displayed but before it's
-removed. As a result any changes BODY does on the text will be
+removed. As a result any changes BODY does on the text will be
visualized by the hint."
(declare (indent 4) (debug t))
`(evil-goggles--if-hint-on ,beg ,end (progn ,@body)
- (evil-goggles--show-overlay ,beg ,end ,face (or ,dur
evil-goggles-duration2)
+ (evil-goggles--show-overlay ,beg ,end ,face (or ,dur
evil-goggles-async-duration evil-goggles-duration)
,@body)))
(defun evil-goggles--show-or-pulse-overlay (ov face dur)
@@ -198,8 +208,8 @@ disappeared."
(declare (indent 4) (debug t))
`(evil-goggles--if-hint-on ,beg ,end (progn ,@body)
(if (or (eq evil-this-type 'block) evil-goggles--force-block)
- (evil-goggles--show-block-overlay ,beg ,end ,face (or ,dur
evil-goggles-duration))
- (evil-goggles--show-overlay ,beg ,end ,face (or ,dur
evil-goggles-duration)))
+ (evil-goggles--show-block-overlay ,beg ,end ,face (or ,dur
evil-goggles-blocking-duration evil-goggles-duration))
+ (evil-goggles--show-overlay ,beg ,end ,face (or ,dur
evil-goggles-blocking-duration evil-goggles-duration)))
,@body))
(defmacro evil-goggles--show-overlay (beg end face dur &rest body)
@@ -231,7 +241,7 @@ Running code while the hint is on isn't supported."
;; NOTE both of the limitation stated above can likely be addressed
;; if needed
(let ((ovs)
- (dur (or dur evil-goggles-duration))
+ (dur (or dur evil-goggles-blocking-duration evil-goggles-duration))
(overlay-face `(:background ,(evil-goggles--face-background face))))
;; TODO drop this var
(unwind-protect
(progn
- [nongnu] elpa/evil-goggles b756edf31e 182/225: Show hint on u/redo after inserting text with "O", (continued)
- [nongnu] elpa/evil-goggles b756edf31e 182/225: Show hint on u/redo after inserting text with "O", ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 6d2ce52faa 200/225: Add hint for `m`, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 8aa26e9671 205/225: CI: run package-lint, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 77a8bb1785 207/225: Update README, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 87722a5b46 210/225: Add hint for `D`, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles d7876e6566 218/225: Drop unnecessary helper macro, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 636b263361 215/225: Make async overlay cleanup more robust, without using pre-command-hook, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 12cfb80230 104/225: Use separate config, face and advice for nerd-commenter and commentary. Refs #13, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 75d124851f 156/225: Update README.md, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles d4b3d873dc 155/225: Update CI setup to run evil's tests unaltered, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 761abb7b2f 145/225: Hint duration should be configured via three variables,
ELPA Syncer <=
- [nongnu] elpa/evil-goggles f282263af4 120/225: Show visual hint after shift left/right, not before #7, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 2932d91a6c 129/225: Remove deprecated functions, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles d3802c500f 141/225: Rename function with-no-hint => with-disabled-hint, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 888f064624 130/225: Add docstrings, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 7f30cbd73c 139/225: Fix default values, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 838aacbe33 176/225: evil-goggles--show-p: check for a single char *and* single line, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 5780bcf8cb 186/225: Show hint only when the command is called interactively #18, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 4bfc8df8b3 191/225: Remove deprecated macros, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles bb974e38d2 193/225: Add hints for `J`, `gq` and `=`, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 42051e2cb3 197/225: Keep configuration per command in a variable, ELPA Syncer, 2022/01/12