branch: master
commit b12e30cb2e8f57ef8a40cc7c956b9d1cfa3012bf
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
Fix last commit being incompatible with older Emacs
* ivy.el (ivy--format): Use `add-face-text-property' only when it's
bound.
---
ivy.el | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/ivy.el b/ivy.el
index fd0eae8..ffba8ff 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1324,10 +1324,11 @@ CANDS is a list of strings."
(setq cands (mapcar
(lambda (s)
(let ((s (copy-sequence s)))
- (add-face-text-property
- 0 (length s)
- `(:height ,(face-attribute 'default :height)
- :overline nil) nil s)
+ (when (fboundp 'add-face-text-property)
+ (add-face-text-property
+ 0 (length s)
+ `(:height ,(face-attribute 'default :height)
+ :overline nil) nil s))
s))
cands))
(let* ((ivy--index index)