Skip to content

Faces ​

The :custom-face keyword allows customization of package’s faces. Example:

emacs-lisp
(use-package eruby-mode
  :custom-face
  (eruby-standard-face ((t (:slant italic)))))
emacs-lisp
(use-package example
  :custom-face
  (example-1-face ((t (:foreground "LightPink"))))
  (example-2-face ((t (:foreground "LightGreen")))))
emacs-lisp
(use-package zenburn-theme
  :preface
  (setq my/zenburn-colors-alist
        '((fg . "#DCDCCC") (bg . "#1C1C1C") (cyan . "#93E0E3")))
  :custom-face
  (region ((t (:background ,(alist-get my/zenburn-colors-alist 'cyan)))))
  :config
  (load-theme 'zenburn t))

Similarly to :custom (see User options), this allows configuring customizable faces outside of Customize (see Saving Customizations in GNU Emacs Manual). Using both systems to configure the same face can lead to confusing results.