sebastiencs / company-box

A company front-end with icons
563 stars 64 forks source link

company-box.el: don't inherit non-existing faces #193

Closed Hi-Angel closed 1 year ago

Hi-Angel commented 1 year ago

As evident from the function name, define-obsolete-face-alias makes one face an alias to another. IOW the old and new faces become the same thing. So when company-box later calls "inherit" on the older face, it basically tries to inherit its own face.

Even worse: the new face at the aliasing point wasn't even defined, that ideally should have raised a runtime error. Anyway, fix this by moving the paragraph to after company-box faces declared.

Fixes: https://github.com/sebastiencs/company-box/issues/176 Fixes: https://github.com/sebastiencs/company-box/issues/155

Hi-Angel commented 1 year ago

As a separate note, not sure why would you need to obsolete the other faces at all.

sebastiencs commented 1 year ago

Thanks @Hi-Angel

As a separate note, not sure why would you need to obsolete the other faces at all.

Defining those company-box faces was a mistake. We should use the same faces than company-mode. I will remove them some day