branch: elpa/evil-goggles
commit 1014993453221522ceb73c272c36d5372d479c63
Author: Evgeni Kolev <[email protected]>
Commit: Evgeni Kolev <[email protected]>
Add custom variable evil-goggles-blacklist to allow disabling individual
functions
---
evil-goggles.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/evil-goggles.el b/evil-goggles.el
index 2008377591..c1ae6f5958 100644
--- a/evil-goggles.el
+++ b/evil-goggles.el
@@ -46,6 +46,9 @@
(defcustom evil-goggles-faces-alist nil
"Association list of faces to use for different commands.")
+(defcustom evil-goggles-blacklist nil
+ "List of functions which should not display the goggles overlay.")
+
(defun evil-goggles--face (command)
"Return the configured face for COMMAND, or the default face."
(or
@@ -143,7 +146,11 @@ Toggling evil goggles mode will add/remove the advice"
(defun evil-goggles--advice-add-all ()
"Add advice around the functions registered in variable
`evil-goggles--advices'."
- (maphash (lambda (advised-fun advice-fun) (advice-add advised-fun :around
advice-fun)) evil-goggles--advices))
+ (maphash
+ (lambda (advised-fun advice-fun)
+ (unless (memq advised-fun evil-goggles-blacklist)
+ (advice-add advised-fun :around advice-fun)))
+ evil-goggles--advices))
(defun evil-goggles--advice-remove-all ()
"Revemo advice around the functions registered in variable
`evil-goggles--advices'."