]> code.delx.au - gnu-emacs-elpa/commitdiff
company-preview* faces: inherit from company-tooltip-[common-]selection
authorDmitry Gutov <dgutov@yandex.ru>
Sat, 1 Feb 2014 03:29:27 +0000 (05:29 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sat, 1 Feb 2014 03:29:27 +0000 (05:29 +0200)
when background is light.

NEWS.md
company.el

diff --git a/NEWS.md b/NEWS.md
index 89579125dc2bfaf753d93591e3af209b78e79116..8a0a918b274989a45bc02b1daec19d3de8433e49 100644 (file)
--- 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`.
index e43dd7490c44689db145deac278232a7195a572a..c3f5b2c2c690ac48b194b6def9ec9a58017bdab6 100644 (file)
   "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