GitHub-reference: https://github.com/jwiegley/use-package/issues/1008
Copyright-paperwork-exempt: yes
(defun use-package-normalize/:custom-face (name-symbol _keyword arg)
"Normalize use-package custom-face keyword."
(let ((error-msg
- (format "%s wants a (<symbol> <face-spec>) or list of these"
+ (format "%s wants a (<symbol> <face-spec> [spec-type]) or list of these"
name-symbol)))
(unless (listp arg)
(use-package-error error-msg))
(spec (nth 1 def)))
(when (or (not face)
(not spec)
- (> (length def) 2))
+ (> (length def) 3))
(use-package-error error-msg))))))
(defun use-package-handler/:custom-face (name _keyword args rest state)
;; Maintainer: John Wiegley <johnw@newartisans.com>
;; Created: 17 Jun 2012
;; Modified: 29 Nov 2017
-;; Version: 2.4.2
+;; Version: 2.4.3
;; Package-Requires: ((emacs "24.3") (bind-key "2.4"))
;; Keywords: dotemacs startup speed config package
;; URL: https://github.com/jwiegley/use-package
(backquote (example-2-face ((t (:foreground "LightGreen"))))))
(require 'example nil nil))))
+(ert-deftest use-package-test/:custom-face-3 ()
+ (match-expansion
+ (use-package foo :custom-face (foo ((t (:background "#e4edfc"))) face-defspec-spec))
+ `(progn
+ (apply #'face-spec-set (backquote (foo ((t (:background "#e4edfc"))) face-defspec-spec)))
+ (require 'foo nil nil))))
+
(ert-deftest use-package-test/:init-1 ()
(match-expansion
(use-package foo :init (init))