(defvaralias A B) throws an error if A is already defined. This breaks
Doom in the event that Doom's config is loaded late (e.g. with 'doom
run'), or these variables are set elsewhere (e.g. the sandbox). I didn't
want to have to do all these checks at startup, but it seems
unavoidable.
Since Doom will only support near-enough the latest commit of Emacs 28
HEAD, I will remove these fixes at the end of May, give or take a week.
custom-theme-set-faces! depends on doom-theme's previous-theme property
being non-nil to determine if the theme has been set (and if so, apply
its changes immediately), but at startup custom-enabled-themes is empty,
so it was never non-nil.
Fixes#5009Fixes#5000
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
'doom is a pseudo theme used to store internal faces and variables, and
must have the highest precedence (like the 'user theme, but without the
risk of being written to custom-file).
After studying set-language-environment, it seems to embody all these
lines. And without without it, non-English glyph rendering is very
slow (see https://emacs-china.org/t/org-mode/16918).
This may have other implications, however, so further testing is needed.
doom-unicode-font, doom-variable-pitch-font, and the fontset settings
were loaded in the wrong order (before the theme, but should be after).
This means the psuedo 'doom' theme that stores these settings are being
loaded too early.
Already set in early-init.el, and deferred compilation is auto-disabled
in noninteractive sessions, so only matters to clients that load
early-init.el.
Also:
+ Refactors recentf config in general, revises/expands its code
comments, and uses :custom to set file variable (a new convention I'm
trying out).
+ recentf-auto-cleanup = 300 in daemon sessions, since the old strategy
of "cleanup on kill-emacs-hook" isn't so great for daemon users.
Emacs generates long file names for auto-save and backup files.
undo-fu-session and tramp are two more big offenders. This fix SHA1s
their file names so they never exceed 40 characters.
Will also affect any package that uses make-backup-file-name-1
directly (like undo-tree).
By deleting straight, the latest pinned version will be reinstalled on
the second part of the 'doom upgrade' process.
This is a clumsy fix for a catch 22 where using straight to update
straight would break due to backwards incompatibilities (see #4950).
This will do while we wait for the CLI rewrite.
+ Adds doom-emoji-fallback-font-families
+ Adds doom-symbol-fallback-font-families
+ Gives doom-unicode-font higher precedence (and sets it to nil by
default, since Emacs defaults to symbola already).
+ Store custom face settings in psuedo theme, rather than crowding the
user theme (which may be immortalized to custom-file, which we want to
avoid).
+ Now, after-setting-font-hook is guaranteed to fire after *all* fonts
are set, giving you a more reliable interface to add your own
font(set) modifications.
More testing is needed to ensure the patched fonts our ligatures modules
don't conflict with this change.
Produces more helpful (and harder-to-miss) error messages when a hook
emits an error. Also advises run-hook when doom-debug-mode is active, so
errors in hooks (generally, major mode hooks) don't quietly go
unnoticed.
More in line with Emacs' built-in practice of storing a variable's
standard-value in a symbol property of the same name, with the added
benefit of less global state.
In older versions of Emacs (26.3 and below), the minibuffer would
replace the whole minibuffer's contents just to display error messages.
This was very frustrating for mundane errors, like the "text is
read-only" error you get when you press backspace at BOL.
Later versions of Emacs now display errors at the end of the minibuffer,
so this hack will no longer be needed when we drop 26.x support later
this year.
We were making the value of doom-first-input-hook permanent-local
instead of doom-first-input-hook itself. That value is normally nil at
this point, which seems to be harmless. Reloading core.el from a script
(while doom-first-input-hook is not empty) results in an error.
Fix it by adding the missing quote present in the other calls.
This could potentially cause stuttering for long lived sessions where
the user takes few breaks, but could yield great performance benefits in
the shorter term. We'll have to experiment.