jwiegley / use-package

A use-package declaration for simplifying your .emacs
https://jwiegley.github.io/use-package
GNU General Public License v3.0
4.42k stars 260 forks source link

:custom-face cannot :inherit? #841

Closed ianyepan closed 3 years ago

ianyepan commented 4 years ago

This seems to be a long standing problem, that is, not being able to use the inherit attribute in the custom-face macro.

One example would be, instead of this:

(use-package doom-themes
  :custom-face
  (default                      ((t (:foreground "#aabbbb")))) ; brighter default
  (font-lock-variable-name-face ((t (:foreground "#aabbbb")))) ; brighter default
  :config
  (load-theme 'doom-solarized-dark t))

I'd like to write this:

(use-package doom-themes
  :custom-face
  (default                      ((t (:foreground "#aabbbb")))) ; brighter default
  (font-lock-variable-name-face ((t (:inherit default))))      ; brighter default
  :config
  (load-theme 'doom-solarized-dark t))

Is this possible?

a13 commented 4 years ago

inherits work for me

:custom-face
(ivy-current-match ((t (:inherit 'hl-line))))

It's even possible to inherit from itself

ianyepan commented 4 years ago

@a13 Very weird.. I did it your way and when I inspect the face of ivy-current-match with counsel-face, I get 'hl-line under the Inherit property. So far so good, but when I click on the 'hl-line value of the property it brings me to a help buffer of an undefined face. Removing the quote in front of 'hl-line makes little difference. It still gives me an undefined face.

Counsel-face

Screenshot 2020-08-25 at 00 13 14

After clicking on 'hl-line

Screenshot 2020-08-25 at 00 13 28
ianyepan commented 3 years ago

Issue solved, probably due to an early bug that is now fixed.