casouri / eldoc-box

childframe doc for eglot and anything that uses eldoc
361 stars 26 forks source link

Get inherited faces #77

Closed seagle0128 closed 1 year ago

seagle0128 commented 1 year ago

https://github.com/casouri/eldoc-box/blob/049eacfd9808c446d93891b4d3332f5d62c0c053/eldoc-box.el#L479

should be (face-attribute 'eldoc-box-border :background nil t) to get the inherited background color.

casouri commented 1 year ago

Thanks. It's treated more or less as a variable rather than a face. Did you run into some problems with the current behavior?

seagle0128 commented 1 year ago

When I define the face as below

(defface posframe-border
      `((t (:inherit region)))
      "Face used by the `posframe' border.")
(defface eldoc-box-border
    `((t (:inherit posframe-border)))
    "Face used by `eldoc-box`.")

Now evaluate the snippet

(face-attribute 'eldoc-box-border :background) ;; => unspecified
(face-attribute 'eldoc-box-border :background nil t) ;; => "#42444a" on my env
casouri commented 1 year ago

Fair enough. I made the change you suggested. Thanks.

seagle0128 commented 1 year ago

Thanks! Closded by 2070e2fc165106cf15cc1eb7e44ecb9e98a29dec