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

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

[nongnu] elpa/evil-goggles 1014993453 028/225: Add custom variable evil-


From: ELPA Syncer
Subject: [nongnu] elpa/evil-goggles 1014993453 028/225: Add custom variable evil-goggles-blacklist to allow disabling individual functions
Date: Wed, 12 Jan 2022 08:58:39 -0500 (EST)

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

    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'."



reply via email to

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