dgutov pushed a commit to branch master
in repository elpa.
commit f23ff8d6751a138b8b0cb2137fb152c14959799b
Author: Dmitry Gutov <[email protected]>
Date: Sat Feb 1 05:29:27 2014 +0200
company-preview* faces: inherit from company-tooltip-[common-]selection
when background is light.
---
NEWS.md | 2 ++
company.el | 21 +++++++++++++++------
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/NEWS.md b/NEWS.md
index 8957912..8a0a918 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,8 @@
## Next
+* `company-preview*` faces inherit from `company-tooltip-selection` and
+ `company-tooltip-common-selection` on light themes.
* `company-preview-frontend` renders itself after the cursor.
* New user option `company-transformers`.
* First transformer, `company-sort-by-occurrence`.
diff --git a/company.el b/company.el
index e43dd74..c3f5b2c 100644
--- a/company.el
+++ b/company.el
@@ -139,18 +139,27 @@
"Face used for the tooltip scrollbar background.")
(defface company-preview
- '((t :background "blue4"
- :foreground "wheat"))
+ '((((background light))
+ :inherit company-tooltip-selection)
+ (((background dark))
+ :background "blue4"
+ :foreground "wheat"))
"Face used for the completion preview.")
(defface company-preview-common
- '((t :inherit company-preview
- :foreground "red"))
+ '((((background light))
+ :inherit company-tooltip-selection)
+ (((background dark))
+ :inherit company-preview
+ :foreground "red"))
"Face used for the common part of the completion preview.")
(defface company-preview-search
- '((t :inherit company-preview
- :background "blue1"))
+ '((((background light))
+ :inherit company-tooltip-common-selection)
+ (((background dark))
+ :inherit company-preview
+ :background "blue1"))
"Face used for the search string in the completion preview.")
(defface company-echo nil