Commit Graph

688 Commits

Author SHA1 Message Date
68edae421f refactor: doom-profile-generate: remove defunct build step
Since 87a024e, the profile init files are no longer byte-compiled, so
this block of code -- responsible for deleting byte-compiled init files
-- is no longer needed.

Amend: 87a024ee90
2025-01-08 19:33:37 -05:00
0a715cc3f2 refactor: (if|when)-let -> (if|when)-let*
With the former macros' future in the air (and likely to be targeted in
future, potentially breaking changes), I'll deal with this now than have
it bite me later.

Ref: https://lists.gnu.org/archive/html/emacs-devel/2024-10/msg00637.html
2025-01-08 19:33:37 -05:00
e3bc367ba2 nit: minor comment revision 2025-01-08 19:33:37 -05:00
8056650364 perf: gcmh-high-cons-threshold = 64mb
Up from a conservative 16mb. This is the temporary GC threshold while
the user is active, and should be set to a value that makes GC less
likely.
2025-01-08 19:33:37 -05:00
2f8b49ea7a fix: reset gc-cons-threshold if not already 2025-01-08 19:33:37 -05:00
ad4eee6f66 refactor: remove redundant backport
Was moved to doom-compat.el in 201321c.

Amend: 201321c929
2025-01-08 19:33:36 -05:00
cc18218889 refactor: nconc -> add-to-list
The doom-*.el files will soon be moved to separate core modules (whose
load order the user can dictate); when this happens, this block could be
re-evaluated anytime the user calls `doom/reload` or otherwise reloads
the active profile.
2025-01-08 19:33:36 -05:00
50b9afbb2d refactor: swap load-theme advice for enable-theme-functions
Instead of advising load-theme, which was more opinionated, and broke in
instances where users (relying on `custom-enabled-themes`s setter) or
packages (like auto-dark) were enabling themes with `enable-theme`
instead of `load-theme`.

This also adds support for enabling multiple themes with `doom-theme`.

Fix: #8119
2025-01-08 19:33:33 -05:00
ecd079f6da feat(lib): backport {enable,disable}-theme-functions
Backported so I don't have to write compatibility boilerplate for <29.
2024-12-11 15:18:00 -05:00
ba1dca322f revert: tweak(sh): auto-mode-alist: generalize /*rc rule
Cast too wide a net; there are likely too many *rc files that shouldn't
be treated as shell scripts.

Besides, there's already a fallback *rc rule for conf-mode in
lisp/doom-editor.el.

Revert: bdc35faff2
2024-12-05 16:39:23 -05:00
c788769469 refactor: move GPG defaults to :config default
Assuming GPG is present and set up by default can be surprising for
beginners, so this commit makes GPG integration opt-in, behind a new
+gnupg flag in the :config default module. There'll be more added to
this later.
2024-12-05 16:38:26 -05:00
ea616ebd5b fix(lib): cmd!: remove superfluous macro declarations
These don't apply to macros anyway.
2024-12-05 16:25:54 -05:00
82cfe98ccc fix(lib): doom-copy: copy first level of records
Regardless of DEEP?, a record's fields should be copied one level deep
at least, to ensure shallow changes to shallow copies don't affect the
original.

Amend: 169540ad3b
2024-12-05 16:25:54 -05:00
ec645b8381 fix(lib): 'unknown specializer record' error on Emacs <30
Seems the 'record' specializer wasn't introduced until Emacs 30, so
users on earlier versions will see this error on startup.

Fix: #8186
2024-12-01 15:48:52 -05:00
fca69c9849 release(modules): 25.01.0-dev
Ref: 2b39e41368
2024-12-01 11:31:40 -05:00
7dddbcf793 fix(lib): native-comp-deferred-compilation-deny-list in sandbox 2024-12-01 11:14:46 -05:00
b9e436663b fix(cli): defcli-obsolete!: don't rely on lexical-binding
Emacs requires '-*- lexical-binding: t -*-' to be prefixed with an elisp
line comment (two semicolons), but due to our shebang shenanigans (which
are, unfortunately, necessary) starting this line with a :;, Emacs
ignores the `lexical-binding: t` at the top, thereby executing bin/doom
without lexical binding.

Until a better workaround is found, our CLI framework will have to
adapt. Fortunately, this only affects bin/doom and not any arbitrary
doomscript.
2024-12-01 01:59:03 -05:00
abedb71f96 refactor(cli): restructure doom profile commands
- Replace 'doom profiles sync' with 'doom profile sync --all'.
- Move lisp/cli/profiles.el to lisp/cli/profile.el.
- Move obsolete alias to bin/doom.
2024-12-01 01:57:46 -05:00
87a0d9d2e1 fix: void-variable native-comp-deferred-compilation-deny-list
Error occurs on Emacs 30.0.92 or newer, because this variable (what it's
aliased to, at least) was moved to comp-run.el, upstream.

Ref: emacsmirror/emacs@e6a955d242
2024-12-01 01:20:45 -05:00
be6fcece3a fix(cli): doom gc
cli/gc.el accidentally snuck into 5e84709, along with a particular
v3-isms that doesn't belong in Doom yet, such as autoloads in CLI libs
and them providing subfeatures of doom-cli, rather than doom-cli-*.
These have been reversed for now.

Amend: 5e84709577
2024-12-01 01:20:41 -05:00
9c8ea37a2d refactor(cli): remove cli/packages.el
This file is mostly redundant. There is much more trimming/culling of
Doom's package API pending, but I'll save that for v3.
2024-12-01 01:20:38 -05:00
9aaefbe4ae refactor: remove redundant straight hacks
These were moved to doom-straight and renamed in 8cafbe4.

Amend: 8cafbe4408
2024-11-30 22:50:27 -05:00
3401492c84 refactor: deprecate letenv!
`letenv!` is a layover from the days before
`with-environment-variables` (introduced in 28.x), and it remained
afterwards because I preferred the shorter name. From v3 and onward,
Doom's core will be put on a diet which, among other things, will
include culling redundant or superfluous functions/macros like this one.
2024-11-30 22:50:27 -05:00
a39dd36e97 refactor: move templates/ to static/
To better reflect what this directory is intended to store (i.e. not
just templates).
2024-11-30 22:50:27 -05:00
201321c929 feat(lib): backport safe-local-variable-directories
Necessary to silence safe-local-variable warnings/prompts for $EMACSDIR
and $DOOMDIR, later.
2024-11-30 22:50:27 -05:00
da08aa2d7d feat(lib): backport major-mode-remap{,-alist}
Will be necessary for treesit.el support coming to the :tools
tree-sitter module later.
2024-11-30 22:50:27 -05:00
3b6e46ef00 feat(lib): move backports to doom-compat.el
Moves backports to new doom-compat library.

Also rolls out defbackport! calls, because it's unnecessary boilerplate.
2024-11-30 22:49:35 -05:00
bf9249d002 docs: don't recommend doom/reload
Many users seem to treat `doom/reload` like a 1-to-1 replacement for
`doom sync` + restart Emacs (which it is not), and are surprised when it
fails to properly "reload" their config. I'm considering removing
`doom/reload` altogether for this reason, or turning it into a light
wrapper around `restart-emacs`, but for now I'll settle for recommending
it less in documentation and comments. The references in docs/*.org will
be dealt with later.
2024-11-25 20:28:45 -05:00
97387b89fb fix(lib): with-doom-module: nil -> empty doom-module-context
Would throw an "Invalid key: nil" error if KEY was `nil`.

Fix: #8176
Amend: 8cafbe4408
2024-11-25 17:10:10 -05:00
169540ad3b feat(lib): add doom-copy
For deep-copying. Necessary for coming changes.
2024-11-25 17:09:54 -05:00
9c8cfaadde fix(cli): doom sync: void-variable envvars error
For Windows users only.

Amend: 8cafbe4408
2024-11-23 08:34:34 -05:00
87a024ee90 fix: don't byte-compile profile init file
The performance benefit of doing so has always been questionable or, at
best, negligible, but has caused numerous issues over the years. The
latest one being #8162, where byte-compiling a profile init file with
too many package autoloads would consume more than 255 opcodes, causing
an overflow error.

For simplicity's sake, Doom will no longer byte-compile this file.

Fix: #8162
2024-11-19 00:40:57 -05:00
caab7f9263 nit: move obsolete aliases
To group together everything I plan to delete in v3.
2024-11-15 04:08:23 -05:00
2373511daf refactor(lib): deprecate doom-plist-get
It's redundant with cl-getf, and so will be removed in v3.0.
2024-11-15 04:08:23 -05:00
fa0a83ff2f feat(lib): add doom-plist-{map,map*} 2024-11-15 04:08:16 -05:00
7bc39f2c14 fix: restore noninteractive init settings
Accidentally removed in 8cafbe4, when it was supposed to be moved.

Amend: 8cafbe4408
2024-11-14 05:16:57 -05:00
87833005fd tweak(cli): remove 'doom i' alias
Freeing this up to use for a future command (doom init), and because
'doom install' ought to be used very rarely and deliberately, so it
shouldn't have a convenient alias anyway.
2024-11-13 17:21:32 -05:00
5e84709577 nit(cli): fix print-group! indentation 2024-11-13 17:10:09 -05:00
cb557319a9 fix(lib): silence deprecation notice from autoload.el
It's been replaced with loaddeffs-gen.el in >=30, but we can't switch to
it until we've dropped 29.x support.
2024-11-13 17:09:36 -05:00
1af6fe8502 fix(cli): cull empty let-forms in autoloads
Amend: 114f99688c
2024-11-12 05:37:12 -05:00
989e7a0034 fix(cli): decli-group!: indentation 2024-11-12 04:30:12 -05:00
68ace9c1f1 docs(cli): report full command in command-based errors 2024-11-12 04:30:09 -05:00
fdcab58a1b fix: raise compile errors from profile init files
Otherwise, errors in package/module/user autoloads could cause `doom
sync` to silently and invisibly fail.

Fix: #7253
2024-11-08 01:18:48 -05:00
eea00f5d45 refactor: remove doom/goto-private-*-file commands
These commands were removed in an ongoing effort to slim down Doom and
its core. The `doom/goto-private-*-file` family of commands were
redundant with `doom/open-private-config` and
`doom/find-file-in-private-config`.
2024-11-07 04:03:13 -05:00
6a8c09f012 fix: package autoload order
This is an old issue that's haunted Doom for a while. I had initially
planned to wait until the switch to Elpaca, but I decided to just sit
down and solve this.

This ensures package autoloads are always written in depth-first
dependency order to Doom's profile init file, preventing load-order
issues like the notorious void-function geiser-activate-implementation
error. `geiser` needs to be built before any `geiser-*` plugins, since
its plugins reference variables/functions in geiser's own autoloads, but
there's no way to enforce package order in `straight--build-cache`
currently, and subsequent package updates (or just deleting package
directories by hand) can change the order of straight's build-cache in
subtle ways.

Fix: #7693
Fix: #7472
2024-11-07 02:48:52 -05:00
bcd399d1c3 fix: more void-variable doom-module-*-file errors
A stop-gap until the third follow-up to 8cafbe4 is complete.

Fix: #8153
Amend: 8cafbe4408
2024-11-06 18:23:47 -05:00
1b826fa80f refactor: remove load suffix hacks
The lexical bindings for the load suffix variables in early-init.el does
this work already, so affecting the global state of these variables is
redundant and overkill.
2024-11-06 06:13:19 -05:00
0f556345fd fix: remove custom-dont-initialize hack
It seems either Emacs' warning library and/or debugger relies on
custom.el functionality at load time to properly function. If
`custom-dont-initialize` is non-nil when a warning or error occurs,
Emacs fails to fully load the `warning` or `backtrace` libraries,
causing this error to obscure the true warning/error with:

  Error in delayed-warnings-hook (display-delayed-warnings): (void-variable
  warning-minimum-log-level)
2024-11-06 06:12:22 -05:00
48d043301e fix: void symbol doom-module-packages-file
From `doom/reload-packages` and various `doom/bump-*` commands. This is
a stop gap solution until the next big refactor.

Fix: #8149
Amend: 8cafbe4408
2024-11-04 20:44:35 -05:00
0b79fd3391 fix: doom-autoloads--scan: set load-true-file-name too
Ref: 114f99688c
2024-11-04 20:41:55 -05:00