prism.el icon indicating copy to clipboard operation
prism.el copied to clipboard

bug: make sure color attributes are specified in prism-blend

Open Overdr0ne opened this issue 4 years ago • 2 comments

I hit a nasty bug here because my foreground was unspecified when prism-comments-fn was called. I tried to follow the example of ‘color-values’ to decide how to handle that generally for custom color functions.

Overdr0ne avatar Oct 04 '21 16:10 Overdr0ne

Hm, I hit a similar issue in another package, and the solution IIRC was to specify the default face as a final argument to face-attribute, because according to the Elisp manual, that face is supposed to always be fully specified.

alphapapa avatar Oct 04 '21 17:10 alphapapa

Hey, sorry for the delay, I got busy with some things and forgot about this.

Hm, I hit a similar issue in another package, and the solution IIRC was to specify the default face as a final argument to face-attribute, because according to the Elisp manual, that face is supposed to always be fully specified.

Oo, yes, it should be-- and in this case(I'm using https://github.com/dracula/emacs) it seems it is, but it's inheriting it from shadow. The face-attribute function for some reason does not pick up inherited attributes by default(performance? I really dunno). I'll open another PR with that change.

As for this PR, I think that blend function could very well be upstreamed to the colors library. Since it's doing the same type of operation as those functions, I think it only makes sense to follow their example and handle unspecified attributes.

Overdr0ne avatar Oct 15 '21 18:10 Overdr0ne