]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix last commit being incompatible with older Emacs
authorOleh Krehel <ohwoeowho@gmail.com>
Tue, 23 Jun 2015 10:53:57 +0000 (12:53 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Tue, 23 Jun 2015 10:53:57 +0000 (12:53 +0200)
* ivy.el (ivy--format): Use `add-face-text-property' only when it's
  bound.

ivy.el

diff --git a/ivy.el b/ivy.el
index fd0eae8c0029a43354cb3ebafbbd7733d1b8a839..ffba8ff49b127da387c35e9869d5f0ea46135f20 100644 (file)
--- 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)