Commit Graph

217 Commits

Author SHA1 Message Date
3c8240dfaa fix(cli): error if $EMACSDIR/.local/etc/eln missing 2025-05-14 23:43:58 +02:00
510347977e docs(lib): revise various docstrings 2025-05-09 01:14:16 -04:00
e6ee332573 fix(lib): autoload doom/describe-char
Amend: 303dd28db8
2025-05-05 02:45:45 -04:00
303dd28db8 feat(lib): introduce doom/describe-char
A version of describe-char that, when given a prefix arg, will prompt
the user to click where to execute the command (so you can read
text-properties/overlay information for otherwise unselectable text, in
the minibuffer or special UIs).
2025-04-24 04:28:49 -04:00
009a285c0a fix: doom-quit-p when use-dialog-box
I don't know what I was thinking, but I need more sleep.

Amend: 1a0fb88897
2025-04-15 19:08:45 -04:00
20c80c461e fix: void-function use-dialog-box-p
This function doesn't exist before Emacs 29, and also isn't meant to be
used in a global context.

Amend: 6a44a2ea80
2025-04-15 17:21:14 -04:00
a13719af45 refactor(lib): backport static-{if,when,unless}
And deprecate our eval-{if,when}! macros.
2025-04-15 00:39:10 -04:00
1a0fb88897 feat: doom-quit-p: use popup dialog if available
Mainly for Android UX, but also for consistency for folks who *like* GUI
dialog boxes (seek professional help).

Amend: 6a44a2ea80
2025-04-14 22:48:53 -04:00
cbdce0dc71 refactor(cli): doctor: extract symlink check to function 2025-04-11 12:17:48 -04:00
fb0dc4cc85 refactor(lib): doom-debug-mode: make verbosity selective
Now `doom-debug-mode` manipulates `doom-log-level` if you activate it
with a prefix arg, setting it to 1 by default, reducing its verbosity
and cutting down on noise in the logs.
2025-04-11 12:17:44 -04:00
dac6e05b87 refactor: deprecate appendq!, prependq!, & delq! macros
In the interest of slimming down Doom's core (as we near v3), I've
deprecated these macros. They doesn't really need to exist. Sure, the
alternatives aren't as ergonomic or elegant, but they're good enough
that we don't need these trivial wrappers. Their local uses have been
refactored out as well.
2025-03-25 14:16:56 -04:00
49d8cbd8bc fix: use mirror for nongnu-elpa
savannah goes down a lot, causing fatal errors during package management.

Fix: #7171
Ref: #8271
2025-03-15 00:37:59 -04:00
71d9ceead4 fix: ensure empty DEBUG envvar is ignored
Also ensures the envvar is removed if it's empty, and doesn't permeate
an empty DEBUG when executing doom/reload.

Amend: 8c7711920e
Close: #8310
Co-authored-by: AjaiKN <AjaiKN@users.noreply.github.com>
2025-03-13 01:07:52 -04: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
9b4f7ead88 fix(lib): doom-profiles-bootloadable-p: respect XDG_CONFIG_HOME 2025-01-09 14:32:51 -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
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
254a8d38a7 feat(lib): prepend DOOMPROFILELOADPATH to doom-profile-load-path
Instead of replacing it.
2025-01-08 19:33:38 -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
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
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
7dddbcf793 fix(lib): native-comp-deferred-compilation-deny-list in sandbox 2024-12-01 11:14:46 -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
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
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
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
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
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
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
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
e1a2f94ec1 fix: void-variable doom-module-load-path error
`doom-module-load-path` will be removed in the next big refactor commit,
so as a stop gap, I simply move it to doom.el to resolve the reference
error.

This also removes the obsolete alias `doom-modules-dirs`, since it's
been deprecated long enough (and `doom-module-load-path` itself won't be
around much longer anyway).

Ref: #8147
Amend: 8cafbe4408
2024-11-04 18:23:25 -05:00
e2c1801e6a fix: doom/reload: void-variable doom-module-init-file
Fix: #8147
Amend: 8cafbe4408
2024-11-04 18:17:59 -05:00
1d3c2db274 fix: doom-autoloads--scan: s/pfile/file
This typo is responsible of a startup error `delayed-warnings-hooks
void-variable warning-minimum-log-level`.

Fix: #8144
2024-11-04 12:31:11 -05:00
7531c4298e fix: indexing packages' Info documents (part 2)
The issue required a more systemic fix, because the former (before
9e6c46a even) only recorded `Info-directory-list` for the packages that
were installed/updated in that `doom sync` session, forgetting all
packages installed in the past.

Fix: #8143
Amend: 9e6c46a332
2024-11-03 22:33:13 -05:00
b26980a4a4 fix: reversed autoloads
Autoloads were accidentally reversed in 114f996. For some packages,
autoload order is signifcant (such as json-mode, which autoloads
json-mode-auto-mode-list first, then modifies it in a later autoload).

Fix: #8143
Amend: 114f99688c
2024-11-03 21:22:30 -05:00
b3aa41fd74 refactor: profile generators 2024-11-03 21:03:40 -05:00
9e6c46a332 fix: indexing packages' Info documents
Fix: #5457
2024-11-03 21:03:40 -05:00
114f99688c fix: nil load-file-name in package autoloads
Some packages do funky things in their autoloads, so care is needed to
closely emulate an autoloading environment when loading them, however,
in 8cafbe4, Doom wraps these autoloads in a function, thus ensuring
they're executed without `load-file-name` or `load-in-progress` set,
which some packages will expect these in their autoloads.

This fixes the (wrong-type-argument stringp nil) error some folks see
with certain packages doing said funky things in their autoloads (like
realgun in the :tools debugger module).

Fix: #8143
Amend: 8cafbe4408
2024-11-03 21:02:32 -05:00
1f45e9e79e refactor: remove redundant require calls
Amend: aab1595011
2024-11-03 15:19:54 -05:00
f425f2ff3d fix: more void-variable errors
For `straight--build-cache` and `doom-modules`.

Fix: #8140
Amend: 8cafbe4408
2024-11-03 12:36:38 -05:00
aab1595011 fix: void-variable straight-base-dir errors
Fix: #8140
Amend: 8cafbe4408
2024-11-03 12:00:22 -05:00
8cafbe4408 refactor!: restructure Doom core
BREAKING CHANGE: This restructures Doom's core in an effort to slim it
down and partially mirror architectural changes coming in v3. This is
part 2 of 3 commits (part 1 being 1590434), done to facilitate a change
in part 3 that will introduce a new `doom!` syntax for pulling
third-party module libraries from remote sources (similar to `package!`
statements). I am backporting this from V3 so I can move our modules out
into separate repos sooner than later, so development on modules can
continue separately without interfering with v3's roll out.

Though this is labeled a breaking change, it shouldn't affect most users
except those few tinkering directly with Doom's internals.

Ref: 15904349cf
2024-11-03 01:52:28 -05:00