jwiegley / use-package

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

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

Closed andreyorst closed 1 year ago

andreyorst commented 1 year 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 1 year ago

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

andreyorst commented 1 year 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 1 year ago

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

jwiegley commented 1 year 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 1 year 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 1 year ago

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

jwiegley commented 1 year ago

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