branch: master commit fd29bf732f488c42cff35fcb54be31021e311e06 Author: Julien Danjou <jul...@danjou.info> Commit: Julien Danjou <jul...@danjou.info>
* rainbow-mode/rainbow-mode.el: do not fail if face-property is a symbol It turns out there are cases when `face-property' can be just a symbol and we need to protect our selves from that, i.e. `car' should not fail. Hence, `car-safe' is there and if it's `nil', then fall back to `face-property' as is. See https://github.com/tarsius/hl-todo/issues/17 --- packages/rainbow-mode/rainbow-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rainbow-mode/rainbow-mode.el b/packages/rainbow-mode/rainbow-mode.el index 600c8ed..275ca86 100644 --- a/packages/rainbow-mode/rainbow-mode.el +++ b/packages/rainbow-mode/rainbow-mode.el @@ -4,7 +4,7 @@ ;; Author: Julien Danjou <jul...@danjou.info> ;; Keywords: faces -;; Version: 1.0 +;; Version: 1.0.1 ;; This file is part of GNU Emacs. @@ -1101,7 +1101,7 @@ If the percentage value is above 100, it's converted to 100." 0 (if xterm-color? 'face 'font-lock-face) applied))) - (unless (listp (car face-property)) + (unless (listp (or (car-safe face-property) face-property)) (setq face-property (list face-property))) (setq color (funcall (if xterm-color? 'cadr 'cdr) (or (assq (if xterm-color?