[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company 18b7b79 29/46: Fix company--face-attribute help
From: |
Dmitry Gutov |
Subject: |
[elpa] externals/company 18b7b79 29/46: Fix company--face-attribute helper |
Date: |
Wed, 30 Dec 2020 18:33:08 -0500 (EST) |
branch: externals/company
commit 18b7b79d579ac3a93920762742a1eaa35491592f
Author: Henrik Lissner <henrik@lissner.net>
Commit: Henrik Lissner <henrik@lissner.net>
Fix company--face-attribute helper
In three cases:
1. When FACE is remapped to a single face in face-remapping-alist.
2. When FACE remapped to a list of faces (and potentially contains a
self-reference, which face-remap allows so faces can refer to their
pre-remapped selves).
3. When FACE is a face spec, a missing argument would've caused a
wrong-number-of-args error.
Fixes #1022
---
company.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/company.el b/company.el
index b4e40c2..fb39fa8 100644
--- a/company.el
+++ b/company.el
@@ -2750,13 +2750,17 @@ If SHOW-VERSION is non-nil, show the version in the
echo area."
;; Like `face-attribute', but accounts for faces that have been remapped to
;; another face, a list of faces, or a face spec.
(cond ((symbolp face)
- (let ((remap (cadr (assq face face-remapping-alist))))
+ (let ((remap (cdr (assq face face-remapping-alist))))
(if remap
- (company--face-attribute remap attr)
+ (company--face-attribute
+ ;; Faces can be remapped to their unremapped selves, but that
+ ;; would cause us infinite recursion.
+ (if (listp remap) (remq face remap) remap)
+ attr)
(face-attribute face attr nil t))))
((keywordp (car-safe face))
(or (plist-get face attr)
- (company--face-attribute (plist-get face :inherit))))
+ (company--face-attribute (plist-get face :inherit) attr)))
((listp face)
(cl-find-if #'stringp
(mapcar (lambda (f) (company--face-attribute f attr))
- [elpa] externals/company 805637c 24/46: company-cmake: property completion candidates, (continued)
- [elpa] externals/company 805637c 24/46: company-cmake: property completion candidates, Dmitry Gutov, 2020/12/30
- [elpa] externals/company c1e8972 18/46: company-selection: add company-selection-default to have better support for non-selection popup, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 25f6a27 26/46: company-echo-format: Handle company-common being nil, Dmitry Gutov, 2020/12/30
- [elpa] externals/company bbff400 27/46: Fix tooltip background stretching to EOL, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 8c22b58 28/46: Merge pull request #1020 from hlissner/fix-tooltip-bg, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 5f5949b 33/46: Merge pull request #1024 from hlissner/fix-face-helper, Dmitry Gutov, 2020/12/30
- [elpa] externals/company dd92593 35/46: Merge pull request #1032 from kiennq/bug/company-selection-offset, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 97cfbc3 37/46: Merge pull request #1033 from edwargix/master, Dmitry Gutov, 2020/12/30
- [elpa] externals/company e1726c4 22/46: Typo, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 4462e7d 16/46: Merge pull request #1004 from jcs-PR/fix-badge, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 18b7b79 29/46: Fix company--face-attribute helper,
Dmitry Gutov <=
- [elpa] externals/company bea3195 36/46: Implement `company-select-first' and `company-select-last', Dmitry Gutov, 2020/12/30
- [elpa] externals/company 13e2ada 39/46: Avoid calling executable-find for local buffers., Dmitry Gutov, 2020/12/30
- [elpa] externals/company 0edc87d 23/46: Fix a couple of warnings, Dmitry Gutov, 2020/12/30
- [elpa] externals/company c4d205a 31/46: Fix company--face-attribute for text-scaled faces, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 7c25cf4 34/46: company-set-selection: adding offset internally instead of via caller, Dmitry Gutov, 2020/12/30
- [elpa] externals/company e6fa6c0 40/46: Add connection-local caching for gtags executable., Dmitry Gutov, 2020/12/30
- [elpa] externals/company 01f5d10 38/46: Fix company-gtags to work with tramp and multiple locations., Dmitry Gutov, 2020/12/30
- [elpa] externals/company 056d19d 42/46: Rename a function and add NEWS entry, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 3644a59 45/46: company-gtags--executable: Make sure to return the detected value, Dmitry Gutov, 2020/12/30
- [elpa] externals/company fb9db07 19/46: Merge pull request #999 from kiennq/bug/company-selection-default, Dmitry Gutov, 2020/12/30