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

fix #934: use face-spec-set instead of custom-set-faces #1004

Closed andreyorst closed 2 years ago

andreyorst commented 2 years ago

For reference, each time I press the "apply and save" button when I use Custom, my custom file stores not only the settings I've made but each face specified with the :custom-face section in my use-package declarations. This PR fixes it, as suggested in #934.

jwiegley commented 2 years ago

I assume you've applied this change locally and it does the right thing when customize is used?

andreyorst commented 2 years ago

I assume you've applied this change locally and it does the right thing when customize is used?

yes, faces are set properly for me on emacs 29 at least, and custom file is not populated

andreyorst commented 2 years ago

@jwiegley I've fixed macro expansion tests that were affected by this change, so I guess everything should be fine now.

jwiegley commented 2 years ago

Thank you, I just need to try this under my Emacs 28 next week to see how it does. What about Emacs 26 and 27? Do we need a version check, or will this change work on all of them?

andreyorst commented 2 years ago

What about Emacs 26 and 27? Do we need a version check, or will this change work on all of them?

face-spec-set was introduced in Emacs 20.4 so I guess there should be no problem. I can build Emacs 27 and 26 this weekend and see if everything is ok.

-- Andrey Listopadov

jwiegley commented 2 years ago

If it was introduced then, don’t worry about it.

jwiegley commented 2 years ago

I'm traveling for the next week, but once I'm back and can confirm this locally, I will merge.