emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/evil-goggles 5780bcf8cb 186/225: Show hint only when the c


From: ELPA Syncer
Subject: [nongnu] elpa/evil-goggles 5780bcf8cb 186/225: Show hint only when the command is called interactively #18
Date: Wed, 12 Jan 2022 08:59:07 -0500 (EST)

branch: elpa/evil-goggles
commit 5780bcf8cb168af7673578816df9b00b918ad130
Author: Evgeni Kolev <evgenysw@gmail.com>
Commit: Evgeni Kolev <evgenysw@gmail.com>

    Show hint only when the command is called interactively #18
---
 evil-goggles.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/evil-goggles.el b/evil-goggles.el
index f8f1b0644a..3faa193fd3 100644
--- a/evil-goggles.el
+++ b/evil-goggles.el
@@ -193,7 +193,7 @@ visualized by the hint.
 The hint is displayed for `evil-goggles-async-duration' seconds if
 non-nil, else for `evil-goggles-duration' seconds."
   (declare (indent 3) (debug t))
-  `(evil-goggles--if-hint-on ,beg ,end (progn ,@body)
+  `(evil-goggles--if-can-show-hint ,beg ,end (progn ,@body)
      (evil-goggles--show-overlay ,beg ,end ,face (or 
evil-goggles-async-duration evil-goggles-duration)
        ,@body)))
 
@@ -237,13 +237,13 @@ This function returns a list - either ('blink face) or 
('pulse bg)."
      (t
       `(blink ,face)))))
 
-(defmacro evil-goggles--if-hint-on (beg end body1 &rest body2)
+(defmacro evil-goggles--if-can-show-hint (beg end body1 &rest body2)
   "Run one block of code if hint is visible, run the other if not.
 
 If hint is visible, check it's ok to display it from BEG to END.  If
 it's not, do BODY1, else BODY2."
   (declare (indent 3) (debug t)) ;; TODO indent like `if'
-  `(if (and (not evil-goggles--on) (evil-goggles--show-p ,beg ,end))
+  `(if (and (not evil-goggles--on) (evil-goggles--show-p ,beg ,end) 
(called-interactively-p 'any))
        (let ((evil-goggles--on t))
          ,@body2)
      ,body1))
@@ -263,7 +263,7 @@ BODY is executed after the hint has been removed, hence the 
hint is
 The hint is displayed for `evil-goggles-blocking-duration' seconds if
 non-nil, else for `evil-goggles-duration' seconds."
   (declare (indent 3) (debug t))
-  `(evil-goggles--if-hint-on ,beg ,end (progn ,@body)
+  `(evil-goggles--if-can-show-hint ,beg ,end (progn ,@body)
      (if (or (eq evil-this-type 'block) evil-goggles--force-block)
          (evil-goggles--show-block-overlay ,beg ,end ,face (or 
evil-goggles-blocking-duration evil-goggles-duration))
        (evil-goggles--show-overlay ,beg ,end ,face (or 
evil-goggles-blocking-duration evil-goggles-duration)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]