Trying to get 'doom to behave like 'user is too much trouble and causes
too many problems. The magic around 'user is too deeply woven into
custom.el. The whole custom.el fiasco needs to be dealt with another
way.
Fixes#5000Fixes#5009
This reverts commit cab8f03a51.
Urg, they did have to be macros, otherwise arguments are evaluated
immediately. Note to self, stop committing things after midnight.
Fixes#5015Closes#5016
Evaluating custom-set-faces! calls would add setter functions to
doom-load-theme-hook indefinitely, which could add up each time you M-x
doom/reload. Now it adds them to a subhook, which is reset whenever Doom
is reloaded.
custom--inhibit-theme-enable is non-nil by default in Emacs 27, which
inhibits uses of `custom-theme-set-faces` when modifying any theme other
than 'user.
If lexical-binding isn't enabled (with ';; -*- lexical-binding: t; -*-'
at the top of your private config), custom-set-theme! and
custom-theme-set-faces! throw this error. Since these macros are
commonly used in user configs, where I can't police lexical-binding,
I've refactored it to not rely on it.