Commit Graph

19921 Commits

Author SHA1 Message Date
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
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
5649e1acc4 fix: incorrect value for user-init-file
This wasn't really causing any noticable issues, but should be corrected
in any case.
2024-11-03 15:19:54 -05:00
1f45e9e79e refactor: remove redundant require calls
Amend: aab1595011
2024-11-03 15:19:54 -05:00
0b9342589b fix(cli): doom upgrade: void-variable straight-repository-branch
'doom upgrade' naively evaluates straight's recipe so it can delete
it (so 'doom sync' will upgrade it), but the
`straight-repository-branch` reference will error out for users updating
Doom from before 8cafbe4 to a commit after it, since its value now lives
in `doom-straight`, which may not be loaded yet.

Rather than further embed this hack (and because I don't want to spend
more time on straight.el accommodations than I have to, since it'll be
replaced with Elpaca soon), I simply replace the reference with its
value.

Fix: #8140
Amend: 8cafbe4408
2024-11-03 15:19:46 -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
7c89699e3f fix: silence (if|when)-let deprecation warnings
Seems these two macros were marked obsolete very recently on Emacs 31.1
in favor of (if|when)-let*. Since the change seems premature (judging
from the mailing list discussion), and because I disagree with the
change (and will redefine (if|when)-let if they actually go through with
removing them), I simply silence the warnings altogether. They're not
helpful for the end user and end up only spamming them with unactionable
warnings.

I'll wait until upstream figures it out before I make any decisions.

Ref: https://lists.gnu.org/archive/html/emacs-devel/2024-10/msg00637.html
2024-11-03 01:52:45 -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
97c0dcc2c3 fix: early-init with DOOMPROFILE set
Recent changes to early-init.el accidentally moved some arguments
intended for `load` to an inner `let`, which means only the last
argument gets passed to `load`. This results in

```
> Debugger entered--Lisp error: (wrong-type-argument stringp nosuffix)
>   load(nosuffix)
>   (or (load (let ((windows? (memq system-type '(ms-dos windows-nt cygwin)))) (expand-file-name...
```

when starting Doom (or running a doomscript) with DOOMPROFILE set.

Move these arguments back out of the `let`.

Amend: 9ae7aa1122
2024-11-02 07:47:56 -04:00
5dcba2f89f fix: permissions for local dirs
This prevents edge cases where these directories are created with
permissions that prevent Emacs from writing to them. This can happy
either due to an overly-restrictive default umask,
`set-default-file-modes` call, or if `doom-profiles-save` is instructed
to write a file whose parent doesn't exist yet.

Fix: #8134
2024-11-01 03:34:09 -04:00
bbf733c5e0 fix: profile loader file path
Should load the byte-compiled version of the file (and produce one
without a redundant emacs version suffix).

Amend: 9ae7aa1122
2024-11-01 03:07:20 -04:00
8a7b20c43d release(modules): 24.12.0-dev
Ref: 2b39e41368
2024-10-31 21:54:21 -04:00
d80c5e5115 bump: :doom
bbatsov/projectile@8cc2ee8937 -> bbatsov/projectile@0a15d81be9
emacs-compat/compat@e9203e1649 -> emacs-compat/compat@9a234d0d28
emacs-straight/project@5c77d78936 -> emacs-straight/project@2a3fe4c7db
gilbertw1/better-jumper@4762221378 -> gilbertw1/better-jumper@b1bf7a3c8c
radian-software/straight.el@08e197bfa6 -> radian-software/straight.el@33fb469506
rainstormstudio/nerd-icons.el@c3d641d8e1 -> rainstormstudio/nerd-icons.el@cc6c468303
2024-10-31 21:54:20 -04:00
89b087a283 bump: :editor
emacs-evil/evil-collection@6365e7c8ae -> emacs-evil/evil-collection@01d791dd63
emacs-evil/evil@5db0bdc7dc -> emacs-evil/evil@b7ab3840db
emacs-tree-sitter/ts-fold@55f80a202a -> emacs-tree-sitter/ts-fold@01c9ecaaa8
emacsorphanage/god-mode@607aff10a7 -> emacsorphanage/god-mode@9f3f6a1dc9
gabesoft/evil-mc@cff3374bfe -> gabesoft/evil-mc@7e363dd6b0
joaotavora/yasnippet@eb5ba2664c -> joaotavora/yasnippet@fe1f4e0e96
justinbarclay/parinfer-rust-mode@0d16bd75ad -> justinbarclay/parinfer-rust-mode@c611628fbe
radian-software/apheleia@61766b50b2 -> radian-software/apheleia@429daf5f28

- zigfmt is now defined upstream and is no longer needed in lang/zig.

Revert: c7794ba06c
2024-10-31 21:54:20 -04:00
138fa6c995 bump: :os
emacs-straight/xclip@e132bbff55 -> emacs-straight/xclip@9ab22517f3
2024-10-31 21:54:20 -04:00
0d8b6bdfbd bump: :tools
NicolasPetton/pass@ed7031c5c3 -> NicolasPetton/pass@1a9f610015
Silex/docker.el@f3adbf49e1 -> Silex/docker.el@6f8bba0d11
editorconfig/editorconfig-emacs@648f0cf9ae -> editorconfig/editorconfig-emacs@c707d8d0f1
emacs-ansible/emacs-ansible@eebb2fb49d -> emacs-ansible/emacs-ansible@e171dacc12
emacs-lsp/lsp-mode@dd61303b2d -> emacs-lsp/lsp-mode@9b104105ad
emacs-straight/eglot@6b9c4faa52 -> emacs-straight/eglot@81eb273965
emacs-tree-sitter/tree-sitter-langs@365a4f7bf5 -> emacs-tree-sitter/tree-sitter-langs@465a64032d
emacsorphanage/quickrun@c58e2e4be5 -> emacsorphanage/quickrun@d383929c50
flycheck/flycheck-eglot@09e37f4c72 -> flycheck/flycheck-eglot@18d0c98695
joostkremers/parsebib@ace9df7071 -> joostkremers/parsebib@489f690f43
magit/forge@d4e88507bf -> magit/forge@9f2efc3c03
magit/magit@0aa26864e3 -> magit/magit@f2a6133443
meain/evil-textobj-tree-sitter@b4ef204ff8 -> meain/evil-textobj-tree-sitter@5056ebc231
purcell/envrc@532ecdab48 -> purcell/envrc@3c5a60dd91
rejeep/prodigy.el@cc68fa9d60 -> rejeep/prodigy.el@c5a17c280d
spotify/dockerfile-mode@39a012a27f -> spotify/dockerfile-mode@4d893bd2da
tumashu/posframe@570273bcf6 -> tumashu/posframe@ac9f954ac4
yoshiki/yaml-mode@7b5ce294fb -> yoshiki/yaml-mode@d91f878729
2024-10-31 21:54:20 -04:00
ffac5ea4fa fix: doom-module-from-path: doom-{core,user}-dir detection 2024-10-31 21:54:20 -04:00
4d83719e58 fix: doom-module-context: make error free 2024-10-31 21:54:20 -04:00
9aa4470683 refactor: declare doom-module->context side-effect-free 2024-10-31 21:54:20 -04:00
fca6187021 refactor: with-doom-module: context constructor 2024-10-31 21:54:20 -04:00
db76813c26 refactor: rename doom-features to doom-system 2024-10-31 21:54:20 -04:00
25201a40f3 refactor: rename :core module group to :doom
I'll soon introduce a new family of core modules which will house most
of what's currently in the doom-*.el libs, moving them out of core.
2024-10-31 21:54:19 -04:00
c23b6fa5db nit: reformat early-init 2024-10-31 21:54:19 -04:00
9ae7aa1122 tweak: centralize profile loader script
Because this file serves as a global manifest for Doom's profiles, it
should be kept in a central location for any Doom instance to consult,
rather than per-instance. Plus, post-v3 Doom will only write files to
$XDG_*_HOME and $TMPDIR, therefore I'd like to avoid writing to
$EMACSDIR.

This change shouldn't affect end-users, in any case. Run 'doom sync' to
regenerate the file, which should happen when you run 'doom upgrade'
anyway.
2024-10-31 21:54:19 -04:00
5ff8561b5e fix(lsp): lsp!: make non-interactive
This autodef was never intended to be interactive. Use `lsp` or `eglot`
if you need an interactive variant.
2024-10-31 21:54:19 -04:00
7aed77c702 bump: :emacs undo
ideasman42/emacs-undo-fu-session@beb0e285d0 -> emacsmirror/undo-fu-session@beb0e285d0
ideasman42/emacs-undo-fu@dbb3e4b699 -> emacsmirror/undo-fu@dbb3e4b699

- Moving to Github mirrors due to Codeberg outages (#7501).

Ref: #7501
2024-10-31 21:54:19 -04:00
1f8c326dfa fix(eval): remove duplicate REPL entries
The method previously used to remove duplicates was incorrect
2024-10-31 21:44:13 -04:00
dea6552ef9 fix(agda): agda2-auto-maybe-all -> agda2-mimer-maybe-all
Fixes the broken Agda auto mode in Doom Emacs caused by the
introduction of mimer in Agda 2.7.0.

* modules/lang/agda/config.el (agda-auto-mode):
replaced agsy with mimer for auto mode call.
2024-10-24 17:43:56 -04:00
fafdb25dd8 feat(lib): introduce doom-error & error functions 2024-10-20 02:41:51 -04:00
49f4bf6819 fix(lib): letf!: defun* indentation 2024-10-20 02:41:51 -04:00
448bc5cae2 refactor: use negated flags
Ref: 7a806521a92c
2024-10-20 02:41:50 -04:00
15904349cf refactor!: module API
BREAKING CHANGE: This backports some architectural choices from v3.0.
This changes Doom's module API, renaming some functions and removing
others, in order to facilitate some new features, prepare to move Doom's
modules into separate repos, and make way for two, much larger breaking
commits coming in the next few days.

This commit won't break anything for users unless they're tinkering with
Doom's internals/using its `doom-module-*` API directly. I am avoiding
broader backwards incompatibilities until the 3.0 release.

What's new:

- Negated flags. (modulep! :editor evil -everywhere) will return non-nil
  if :editor evil is active without its +everywhere flag.
- `modulep!` now takes multiple flags to simplify AND checks. E.g.

    (and (modulep! +foo)
         (modulep! +bar)
         (not (modulep! +baz)))

  Can now be expressed with:

    (modulep! +foo +bar -baz)
- Adds pcase matchers for `doom-module-context` and `doom-module`
  structs, making the following destructuring binds possible:

    (pcase-dolist ((doom-module group name flags features)
                   (hash-table-values doom-modules))
      ...)

  This will be used more in v3.0.
- Adds file cookie support to module init.el and config.el files.

Here's a summary of breaking changes made in this commit:

- `doom-module-context` was changed from a vector to a struct (record).
- `doom-modules` is now a table of `doom-module` structs, rather than
  free-form plists.
- The following macros have been renamed:
  - `doom-context-with` -> `with-doom-context`
  - `doom-module-context-with` -> `with-doom-module`
- The followings functions have been replaced/removed:
  - `doom-module-context`+`doom-module-context-get` -> `doom-module`
  - `doom-module-set` -> `doom-module--put`
  - `doom-module-p` -> `doom-module-active-p`
  - `doom-module-context-key` (is now a getter with the same name)
  - `doom-module-put` (removed)
  - `doom-module--context-field` (removed)
- The signatures for these functions have changed:
  - `doom-module-get CATEGORY &optional MODULE PROP` ->
    `doom-module-get (GROUP . MODULE) &optional PROP`
  - `doom-module-locate-path CATEGORY &optional MODULE FILE` ->
    `doom-module-locate-path (GROUP . MODULE) &optional FILE`
  - `doom-module-expand-path CATEGORY MODULE &optional FILE` ->
    `doom-module-expand-path (GROUP . MODULE) &optional FILE`
- Adds the following functions
  - `doom-module-exists-p`
  - `doom-module-key`
  - `doom-module->context`
  - `doom-module<-context`
- Removes the following variables
  - `doom-module--empty-context`

This commit results in a little redundancy, which I will address in
parts 2/3 and/or v3.0.
2024-10-20 02:41:42 -04:00
b9deb35aab bump: :lang factor
factor/fuel@31dc1a386b -> factor/fuel@6d0e98494f

Melpa's upstream and recipe for `fuel` changed (see
4a3d7cdefa):
previously it was pulled from a subdirectory of the main `factor`
repository, it now has its own repository. Applying Doom's previous pin
to the new recipe does not seem to work correctly, so update.
2024-10-20 02:32:16 -04:00
a5538209d8 fix(fold): autoload +fold--ensure-hideshow-mode
This function may be called by `+fold--ensure-hideshow-mode-a`, before
autoload/fold.el has been loaded.

Amend: #8067
2024-10-20 02:31:31 -04:00
8b9168de6e release(modules): 24.11.0-dev
Ref: 2b39e41368
2024-10-03 02:26:28 -04:00
03fbb00e3c bump: :ui doom
doomemacs/themes@2c794a09b0 -> doomemacs/themes@1cac71a4b2

Fix: #7853
2024-10-03 02:24:16 -04:00
dc387bc486 fix(mu4e): org-msg: toggle behavior
Toggle behavior:

The `(integerp current-prefix-arg)` check didn't appropriately catch
`C-u`/`SPC u` prefixes. This attempts to use `(prefix-numeric-value
current-prefix-arg)` instead to normalize these cases.

Variable naming:

I'm not sure if this was supposed to continue to be called
`+mu4e-compose-org-msg-toggle-next` or if the rename to private
`+mu4e--compose-org-msg-toggle-next` was intentional and the usage
wasn't updated accordingly. I see the `mu4e` README still mentions it,
so I would guess the former and this was a typo.

Ref: #8073
Amend: a78237cc01
2024-10-03 00:45:35 -04:00
68b3cc86c5 fix(ruby): replace the obsolete macro featurep! with modulep!
Amend: fc35b3cf37
2024-10-03 00:41:42 -04:00
a35992a97d bump: :email wanderlust
wanderlust/wanderlust@8a0ea2146e -> wanderlust/wanderlust@8b413b33cd
2024-10-03 00:40:28 -04:00
397d149313 fix(python): renamed python-pytest commands
These two commands were renamed upstream and pulled in in 1fa1eba:

- python-pytest-function-dwim -> python-pytest-run-def-or-class-at-point
- python-pytest-function-dwim -> python-pytest-run-def-or-class-at-point-dwim

Amend: 1fa1eba5ac
Ref: wbolster/emacs-python-pytest#75
2024-10-03 00:39:55 -04:00