[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-goggles 946598059f 204/225: Fix compilation warnings
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-goggles 946598059f 204/225: Fix compilation warnings |
Date: |
Wed, 12 Jan 2022 08:59:08 -0500 (EST) |
branch: elpa/evil-goggles
commit 946598059f64d128620bb8b20782c8fc2e0d8911
Author: Evgeni Kolev <evgenysw@gmail.com>
Commit: Evgeni Kolev <evgenysw@gmail.com>
Fix compilation warnings
---
evil-goggles.el | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/evil-goggles.el b/evil-goggles.el
index 444ad4c806..430f40d933 100644
--- a/evil-goggles.el
+++ b/evil-goggles.el
@@ -294,11 +294,6 @@ OFF-BY-DEFAULT if non-nil will set the switch to `nil'"
;;; generic blocking advice
-(defun evil-goggles--get-face (command)
- (or
- (plist-get (alist-get command evil-goggles--commands) :face)
- 'evil-goggles-default-face))
-
(defun evil-goggles--show-blocking-hint (beg end &optional force-block)
(let ((dur (or evil-goggles-blocking-duration evil-goggles-duration))
(face (evil-goggles--get-face this-command)))
@@ -331,7 +326,7 @@ OFF-BY-DEFAULT if non-nil will set the switch to `nil'"
(face (evil-goggles--get-face this-command)))
(unwind-protect
;; show the overlay
- (evil-goggles--show-or-pulse-overlay ov 'evil-goggles-default-face dur)
+ (evil-goggles--show-or-pulse-overlay ov face dur)
;; remove the overlay with a timer
(setq
evil-goggles--async-ov ov
@@ -344,7 +339,7 @@ OFF-BY-DEFAULT if non-nil will set the switch to `nil'"
(evil-goggles--show-p beg end))
(evil-goggles--show-async-hint beg end)))
-(defun evil-goggles--generic-async-advice-1 (_ beg end &rest _)
+(defun evil-goggles--generic-async-advice-1 (_ beg end &rest _rest)
(when (and (called-interactively-p 'interactive)
(evil-goggles--show-p beg end))
(evil-goggles--show-async-hint beg end)))
@@ -444,8 +439,7 @@ OFF-BY-DEFAULT if non-nil will set the switch to `nil'"
(defun evil-goggles--record-macro-advice (&rest _)
(let ((beg (line-beginning-position))
(end (1+ (line-end-position)))
- (was-defining-kbd-macro defining-kbd-macro)
- (evil-goggles--hint-on-empty-lines t))
+ (was-defining-kbd-macro defining-kbd-macro))
;; show hint before starting to record a macro
(unless was-defining-kbd-macro
@@ -461,7 +455,7 @@ OFF-BY-DEFAULT if non-nil will set the switch to `nil'"
evil-goggles-enable-paste "If non-nil, enable paste support"
evil-goggles-paste-face "Face for paste action")
-(defun evil-goggles--paste-advice (count &optional register yank-handler)
+(defun evil-goggles--paste-advice (_ &optional register yank-handler)
(when (and (called-interactively-p 'interactive)
(evil-normal-state-p))
(let* ((beg (save-excursion (evil-goto-mark ?\[) (if (eolp) (1+ (point))
(point))))
@@ -512,6 +506,11 @@ Argument YANK-HANDLER is the yank hanler."
(evil-paste-before :face evil-goggles-paste-face
:switch evil-goggles-enable-paste :advice
evil-goggles--paste-advice :after t)
(evil-paste-after :face evil-goggles-paste-face
:switch evil-goggles-enable-paste :advice
evil-goggles--paste-advice :after t)))
+(defun evil-goggles--get-face (command)
+ (or
+ (plist-get (cdr (assoc command evil-goggles--commands)) :face)
+ 'evil-goggles-default-face))
+
;;; minor mode defined below ;;;
(defcustom evil-goggles-lighter
@@ -541,8 +540,7 @@ Argument YANK-HANDLER is the yank hanler."
(remove-hook 'pre-command-hook 'evil-goggles--vanish)
(dolist (command-cfg evil-goggles--commands)
(let ((cmd (car command-cfg))
- (advice (plist-get (cdr command-cfg) :advice))
- (switch (plist-get (cdr command-cfg) :switch)))
+ (advice (plist-get (cdr command-cfg) :advice)))
(advice-remove cmd advice)))))
(provide 'evil-goggles)
- [nongnu] elpa/evil-goggles 219d93e125 118/225: Add support for displaying the hint after the operation, (continued)
- [nongnu] elpa/evil-goggles 219d93e125 118/225: Add support for displaying the hint after the operation, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles c5c49d7965 127/225: Use different duration for before/after hints, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 5c313522cf 128/225: Don't call deprecated functions, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 03cb67fc4c 125/225: Remove duplicated line, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 70ed667698 131/225: Fix compile warnings, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles ea0102bcf5 133/225: Use "post" hint when commenting, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 3f6dd85657 151/225: Update README, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 5bd77428e3 142/225: Cleanup internal API for showing a vertical hint once, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles c515477fd4 160/225: Clarify docs for evil-goggles-async-duration and evil-goggles-blocking-duration, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 674a1be5aa 188/225: Merge branch 'hint-only-when-command-is-interactive'. Close #18, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 946598059f 204/225: Fix compilation warnings,
ELPA Syncer <=
- [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