branch: elpa/evil-goggles
commit 08da44cf837c5096d0c03b0a818da24f6e3474fd
Author: 0rdy <[email protected]>
Commit: Evgeni Kolev <[email protected]>
Add the evil-goggles face
---
README.md | 11 ++++++++---
evil-goggles.el | 8 ++++----
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index cea8cedc1e..1b6b9d228b 100644
--- a/README.md
+++ b/README.md
@@ -58,10 +58,15 @@ Installation
Customization
-------------
-- The appearance of the overlay can be configured with
`evil-goggles-default-face`. By default, the `region` face is used for every
action. To get a list of available faces on emacs start, start a fresh emacs
and run `M-x list-faces-display`.
+- The appearance of the overlay can be configured with `evil-goggles-face`. By
default, inherit from the `region` face and using for every action.
```emacs-lisp
-;; default is 'region, you can try `isearch-fail
-(setq evil-goggles-default-face 'highlight)
+;; If you want to customize only background
+;; You can get a color name with `list-colors-diplay', or use hex value
+(set-face-background 'evil-goggles-face "LightSkyBlue")
+;; Advanced settings can be done with `custom-theme-set-faces'
+(custom-theme-set-faces
+ 'zenburn ; Use your theme name
+ '(evil-goggles-face ((t (:background "dimgray" :foreground "green" :bold
t)))))
```
- To use different faces per edit action:
```emacs-lisp
diff --git a/evil-goggles.el b/evil-goggles.el
index be90238350..b0353f8613 100644
--- a/evil-goggles.el
+++ b/evil-goggles.el
@@ -43,9 +43,9 @@
:type 'number
:group 'evil-goggles)
-(defcustom evil-goggles-default-face 'region
- "Deafult face for the overlay."
- :type 'sexp
+(defface evil-goggles-face
+ '((t (:inherit region)))
+ "Evil-goggles face to use for highlighting different actions."
:group 'evil-goggles)
(defcustom evil-goggles-faces-alist nil
@@ -62,7 +62,7 @@
"Return the configured face for COMMAND, or the default face."
(or
(assoc-default command evil-goggles-faces-alist)
- evil-goggles-default-face))
+ 'evil-goggles-face))
(defun evil-goggles--show (beg end face)
"Show overlay in region from BEG to END with FACE."