Commit Graph

713 Commits

Author SHA1 Message Date
38868c79f5 fix: ignore doom-theme if load-theme is used
Users shouldn't be using both, and `load-theme` should be higher
priority (because it's easier to do by accident).

Fix: #8257
Amend: #8119
Amend: 50b9afbb2d
2025-02-21 15:17:42 -05:00
2bceb217d9 fix(cli): some package files not being byte-compiled (2nd take)
This reverts a workaround for straight that is no longer necessary
because it has been applied upstream and we've bumped the package since.

For some reason I don't understand, this reproducibly fixes a
reoccurrence of the original problem for me: Before this commit, some
files of the citar package were not byte-compiled. After this commit,
the problem is gone.

This effectively reverts 54a084fed7, though it's not a reverting
commit in strict sense because the code has been moved to a different
file.

Revert: 54a084fed7
Ref: d80c5e5115
Ref: #7707
Ref: radian-software/straight.el#1132
Ref: https://discourse.doomemacs.org/t/is-it-expected-that-doom-sync-does-not-byte-compile-native-compile-some-files/4946
2025-02-21 15:05:50 -05:00
373b7aa976 fix: rename {b,e}ol functions to pos-{b,e}ol
These two functions were introduced in emacs-mirror/emacs@f117b5df4d
as `bol` and `eol`, but were renamed to `pos-bol` and `pos-eol` in
emacs-mirror/emacs@2614e53216.

Close: #8242
2025-01-14 13:52:41 -05:00
93ef81bfd4 fix: don't prompt to save non-file buffers
Fix: #8241
2025-01-14 02:47:50 -05:00
311ad23fd4 fix: void-function (setf plist-get) error
Only affected users on Emacs 27, before a generalized setter was defined
for `plist-get`.

Amend: 50b9afbb2d
2025-01-13 12:36:05 -05:00
75a995f66f docs: detect nushell on windows too
Amend: 1a86360560
2025-01-10 18:41:25 -05:00
1a86360560 docs: warn users about nushell issues
Like Fish, using nushell as your shell-file-name can cause downstream
issues wherever Emacs (or Emacs packages) spawn child processes via a
shell command and rely on its output. For example: diff-hl users may not
see a git gutter if nushell (or fish) is their $SHELL.
2025-01-10 18:13:24 -05:00
b31eef9336 revert: fix(lib): doom-copy: copy first level of records
Shallow should mean shallow.

Revert: 82cfe98ccc
2025-01-09 14:33:25 -05:00
9b4f7ead88 fix(lib): doom-profiles-bootloadable-p: respect XDG_CONFIG_HOME 2025-01-09 14:32:51 -05:00
eccd72922b fix(cli): show "restart Emacs" advice only if Emacs is running
Also fixes the case where it'll appear, unconditionally on 'doom
install', where the advice doesn't make sense.
2025-01-09 14:31:26 -05:00
295cee7c78 refactor(cli): s/doom-cli-sync-info-file/doom-sync-info-file
To conform to new naming conventions.
2025-01-09 14:28:54 -05:00
2b4f762b1e release(modules): 25.02.0-dev
Ref: 2b39e41368
2025-01-09 01:07:20 -05:00
1fc41d719c fix: project-current-directory-override takes a directory
Not a `t`. [It overrides `default-directory`](6c1c3120b9/lisp/progmodes/project.el (L196-L198)).
2025-01-09 01:06:20 -05:00
5aed9baa29 fix: auto-mode-alist: make /*rc rule low-priority
The broad /*rc rule, which is intended as a fallback, should be added to
the end of auto-mode-alist, not the beginning. Otherwise, for example,
it overrides the rule for .zshrc files.

Amend: cc18218889
2025-01-09 01:03:55 -05:00
a830b0e41a fix: doom-compat: end-of-file error
Fix: #8233
Fix: #8232
Amend: d6037a24d4
2025-01-08 20:04:47 -05:00
eaf26b83ad fix: file-missing doom-compat error
Fix: #8232
Amend: d6037a24d4
2025-01-08 19:55:47 -05:00
d6037a24d4 refactor: load doom-compat.el from doom.el 2025-01-08 19:33:38 -05:00
d51fffeda5 fix(cli): appease byte-compiler sama 2025-01-08 19:33:38 -05:00
3f1a471127 refactor: replace point-at-{b,e}ol
These were deprecated in 29.1. We'll switch to pol-bol and pos-eol
if/when we drop 28.x support.
2025-01-08 19:33:38 -05:00
7de9723334 feat(cli): defcli-obsolete!: allow arbitrary obsolescence message
Ala `make-obsolete`.
2025-01-08 19:33:38 -05:00
254a8d38a7 feat(lib): prepend DOOMPROFILELOADPATH to doom-profile-load-path
Instead of replacing it.
2025-01-08 19:33:38 -05:00
ad3da32c5f refactor: comp: s/after!/with-eval-after-load
`after!`'s benefits aren't needed here, so use the simplest tool for the
job.
2025-01-08 19:33:37 -05:00
b02564535e fix: "Invalid key: nil" errors in some eval contexts
Breaking `gr` (+eval:region) et co in files outside of Doom's
source (like in packages).

Fix: #8224
2025-01-08 19:33:37 -05:00
881eea137f refactor: remove doom-bin-dir
Or rather, moves its into lib/config.el, which is the only place that
uses it.
2025-01-08 19:33:37 -05:00
a06287cc23 fix: only check for major emacs version changes
Bytecode is typically forwards-incompatible across major releases, not
minor ones.
2025-01-08 19:33:37 -05:00
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