[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-goggles 4bfc8df8b3 191/225: Remove deprecated macros
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-goggles 4bfc8df8b3 191/225: Remove deprecated macros |
Date: |
Wed, 12 Jan 2022 08:59:07 -0500 (EST) |
branch: elpa/evil-goggles
commit 4bfc8df8b3a9a0749ff10ec14e273ca11052030f
Author: Evgeni Kolev <evgenysw@gmail.com>
Commit: Evgeni Kolev <evgenysw@gmail.com>
Remove deprecated macros
---
evil-goggles.el | 75 ---------------------------------------------------------
1 file changed, 75 deletions(-)
diff --git a/evil-goggles.el b/evil-goggles.el
index cffc7224a3..904cec0824 100644
--- a/evil-goggles.el
+++ b/evil-goggles.el
@@ -34,15 +34,6 @@
;;
;; (evil-goggles-mode)
;;
-;;; Internal APIs:
-;;
-;; These functions should be used for displaying hints:
-;;
-;; - evil-goggles--with-async-hint
-;; - evil-goggles--with-blocking-hint
-;; - evil-goggles--with-disabled-hint
-;; - evil-goggles--show-hint
-;;
;;; Code:
(require 'evil)
@@ -175,20 +166,6 @@ convention for the insert-behind-hooks overlay property."
(move-overlay ov (overlay-start ov) (+ len (overlay-end ov))))
(move-overlay ov (overlay-start ov) (- (overlay-end ov) len) ))))
-(defmacro evil-goggles--with-async-hint (beg end face &rest body)
- "Show hint from BEG to END with face FACE, 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
-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-can-show-hint ,beg ,end (progn ,@body)
- (evil-goggles--show-overlay ,beg ,end ,face (or
evil-goggles-async-duration evil-goggles-duration)
- ,@body)))
-
(defun evil-goggles--show-or-pulse-overlay (ov face dur)
"Show or pulse overlay OV with face FACE.
@@ -229,37 +206,6 @@ This function returns a list - either ('blink face) or
('pulse bg)."
(t
`(blink ,face)))))
-(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 (evil-goggles--show-p ,beg ,end) (called-interactively-p 'any))
- (let ((evil-goggles--on t))
- ,@body2)
- ,body1))
-
-(defmacro evil-goggles--with-disabled-hint (&rest body)
- "Do BODY with hints disabled."
- (declare (indent 0) (debug t))
- `(,@body))
-
-(defmacro evil-goggles--with-blocking-hint (beg end face &rest body)
- "Show hint from BEG to END with face FACE, hide it, then do BODY.
-
-BODY is executed after the hint has been removed, hence the hint is
-\"blocking\" because BODY won't run until the hint has disappeared.
-
-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-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)))
- ,@body))
-
(defmacro evil-goggles--show-overlay (beg end face dur &rest body)
"Show overlay from BEG to END with face FACE for DUR seconds.
@@ -274,19 +220,6 @@ will be adjusted if BODY modifies the text in it."
(sit-for ,dur))
(delete-overlay ov))))
-(defun evil-goggles--show-hint (beg end face &optional force-vertical-hint
blocking)
- "Show hint from BEG to END with face FACE for DUR sec.
-
-The hint will be a vertical block if FORCE-VERTICAL-HINT is non-nil.
-If BLOCKING is non-nil, the hint will be treated like a blocking
-hint, i.e. it will be displayed for `evil-goggles-blocking-duration'
-rather than `evil-goggles-async-duration'"
- (if (or blocking force-vertical-hint)
- (let ((evil-goggles--force-block force-vertical-hint))
- ;; use blocking hint for vertial blocks, async hint doesn't support
vertial blocks
- (evil-goggles--with-blocking-hint beg end face))
- (evil-goggles--with-async-hint beg end face)))
-
(defun evil-goggles--show-block-overlay (beg end face dur)
"Show overlay from BEG to END with face FACE for DUR seconds.
@@ -307,14 +240,6 @@ Running code while the hint is on isn't supported."
(sit-for dur))
(mapcar 'delete-overlay ovs))))
-(defun evil-goggles--funcall-interactively (f &rest args)
- "Call F with ARGS interactively.
-
-This function mimics `funcall-interactively', available in Emacs 25,
-so this package can work with Emacs 24"
- (cl-letf (((symbol-function 'called-interactively-p) (lambda (_) t)))
- (apply f args)))
-
(defmacro evil-goggles--define-switch-and-face (switch-name switch-doc
face-name face-doc &optional off-by-default)
"Helper macro defining an on/off var, a face, and duration var.
- [nongnu] elpa/evil-goggles 75d124851f 156/225: Update README.md, (continued)
- [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, 2022/01/12
- [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 <=
- [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
- [nongnu] elpa/evil-goggles 1c72501a6f 196/225: Reduce configuration options - drop `substitute`, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 2b922512fb 199/225: Refactor, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles dac6c45aa1 214/225: Add hint for `Y', when `evil-want-Y-yank-to-eol' is t, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles bf1be3be24 018/225: Don't show overlay on whitespaces-only regions, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 36fb70d6a1 044/225: Rename option `evil-goggles-show-for` to `evil-goggles-duration`, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles c6935dc53d 099/225: Don't bundle evil-tests.el. Fix #15, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 88cb3ffa38 100/225: Fetch evil-tests.el from evil's repo. Comment out parts of it with sed. Refs #15, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 2d2011180f 111/225: Mention experimental pulse option in README, ELPA Syncer, 2022/01/12