This function should not be used as a substitute for
`package-initialize`, to activate packages installed via package.el,
this is solely for metadata for Doom's package manager.
We were setting recentf-auto-cleanup to nil, which is not one of the
supported values in its defcustom type.
Set it to `'never` instead. This has exactly the same effect (recentf
only references `recentf-auto-cleanup` from a `cond` statement, which
does nothing for both values), but we might as well future-proof.
Clean up a duplicate assignment while I'm there.
Noticed because I had copied this into my personal config at some
point (to disable Doom's periodic save in daemon sessions) and recently
converted that config to use `setopt`, which complained.
Doom adds `recentf-cleanup` to `kill-emacs-hook`, but that function only
cleans up `recentf-list` without saving it to disk: saving is handled by
`recentf-save-list`. `recentf-mode` adds `recentf-save-list` to
`kill-emacs-hook` as well... but it only adds that hook when
`recentf-mode` is enabled, which means `recentf-save-list` ends up
before `recentf-cleanup` on `kill-emacs-hook`, rendering the cleanup
ineffective.
This is normally barely noticable, but with many paths on (slow) network
filesystems on `recentf-list` the cleanup can get slow enough to be
annoying.
Fix it by passing a priority to `add-hook`.
This leaves an ineffective cleanup call if we exit Emacs with
recentf-mode disabled, but that should normally only happen if we exit
Emacs without opening a file (`doom-first-file-hook` enables
recentf-mode). If that's an issue, we could add a function to
`recentf-mode-hook` which in turn adds to `emacs-term-hook`, but that
seems too complicated for little gain.
Emulating --init-directory has issues (e.g. isn't exposed to the *exact*
same $HOME environment), so if it's available (i.e. if Emacs 29+ is
being used or Doom lives in ~/.emacs.d or ~/.config/emacs), then use it.
This makes the 'doom emacs' command faster and more reliable as a launch
pad for Doom.
- Simplifies development build check explanation.
- Removes the 27 check, because Doom core will continue to support 27+
for the foreseeable future, but Doom's modules will be dropping 27 and
28 support soon, but that check will be done elsewhere.
Some were outdated, some were incorrectly labeled, others were already
completed, some were missing... Gotta fix them all.
Also, in :ui hl-todo, there are comments that describe how Doom uses
each of these annotations; those have been updated.
`persp-after-load-state-functions` functions must take arguments, but
`doom-kill-childframes-h` didn't take any, causing errors when loading
persp-mode sessions.
Fix: #8700
Amend: e5bbae8144
In the spirit of 6f40ad5, I'm deprecating this macro because it doesn't
provide enough value to exist and serves only to complicate a casual
reader's understanding of Doom's modules.
Ref: 6f40ad55f5
And use it to replace the various `posframe-delete-all` hooks littered
about to clean up child/posframes in contexts where they may linger
after destructive operations (like changing the active workspace or
executing `doom/reload`).
`setq!` was introduced to fix `setopt` pulling in packages. Now that
`setopt` was advised (in fad44ca228) to fix the issue at the source,
this macro is no longer necessary.
Ref: fad44ca228
Seems electric-quote-mode was already disabled by fault, but I was
troubleshooting a package that was globally enabling it in its
autoloads, so this setting wasn't needed.
Revert: 8e6d555cc4
electric-quote-mode invisibly introduces difficult-to-differentiate
utf-8 characters into buffers, which seems strangely imposing as a
default behavior. I make it opt-in instead.
If the site-lisp load-path entries different between the non-interactive
and interactive sessions, there could be redundant paths prepended to
load-path, causing load order issues (#8607). This ensures they are
appended, instead.
Fix: #8607
For dictating what buffers are considered real based on their major
modes.
Also makes most terminal emulator or comint-mode buffers real by
default.
Fix: doomemacs/community#73
Emacs 29 introduced a `restart-emacs` command that is more reliable, but
it cannot restart Emacs with arbitrary arguments, which the old
`restart-emacs` library could. Without this capability,
`doom/restart-and-restore` is not trivially (or elegantly) possible, and
I can't justify a whole extra dependency just to support that,
especially in my pursuit to slim down Doom's core.
This commit also removes the doom/upgrade command, which is an awkward
and fickle command to support across platforms (too many edge cases).
The `setq!` macro was created to solve my issue with `setopt` (that it
can eagerly load packages; imposing more side-effects than necessary).
Instead of having a separate, wrapper macro to fix the matter, I now
advise `setopt` directly to fix the problem, so that users don't have
another macro to keep track of. `setq!` will eventually be deprecated,
then removed in v3.
`doom --help` was missing `sync`, `upgrade`, `doctor`, and `profile` from
the command listing. The root cause: `doom-cli-load-all` iterates the CLI
hash table in non-deterministic order. When an alias stub (e.g. `doom s`
for `sync`) is processed before its primary command, `doom-cli-load` used
the alias's plist—which includes `:hide t`—as `doom-cli--group-plist`.
The loaded file's `defcli!` then inherited `:hide t`, incorrectly marking
the primary command as hidden.
Fix: strip `:hide` from the plist before passing it as the group plist,
and copy-sequence to prevent structural mutation of stored plists.
Fix: #8560
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This is a temporary measure until the interpolation in the powershell
script can be addressed directly (by someone better versed in
powershell).
Fix: #8572Close: #8654
Co-authored-by: kovan <kovan@users.noreply.github.com>
The lack of Symbola can cause crashes, slowdowns, or confusion when
certain glyphs don't show (like org-modern's unicode bullets or certain
ligatures).
Ref: doomemacs/community#66
Way back, I added these three pseudo-features:
(featurep 'dynamic-modules)
(featurep 'harfbuzz)
(featurep 'jansson)
Why? Because some build features have pseudo features (like
`tty-child-frames`, `pgtk`, and `threads`), but others don't, and I
wanted more consistency around build feature detection. Years later, I
realized it wasn't used much internally and only ended up confusing
readers who didn't realize these were Doom's additions and not built
into Emacs. Emacs' idiosyncrasies may not be nice or elegant, but
they're less surprising to elisp beginners and veterans alike.
- Rely on the more efficient `global-hl-line-mode` implementation in
31.1.
- Use the new `global-hl-line-buffers` predicate variable introduced in
31.1 to implement our disable-hl-line-during-selection and major mode
white/blacklist hacks.
- Reverts hl-line-sticky-flag to its default (t), because some features
were aggressively (and erroneously) disabling hl-line (particularly
eldoc).