Commit graph

301 commits

Author SHA1 Message Date
Henrik Lissner
225e159b04
release(modules): 23.02.0-dev
Ref: 2b39e41368
2023-02-23 04:18:11 -05:00
Henrik Lissner
357d10f5a7
feat: add doctor context
Ref: f9201eb218
2023-02-23 01:34:55 -05:00
Nikola Bunjevac
7a8383c2d1
fix(cli): doctor: pluralizing single errors/warnings 2023-02-23 01:15:36 -05:00
Henrik Lissner
9e08097119
fix(cli): doctor: wrong-type-argument stringp error
`doom doctor` throws a type error for enabled modules without a
doctor.el and/or packages.el file. This occurs because, in
in775ee2f04aad, `doom-module-expand-path` was changed to return nil if
the target file did not exist, and the doctor wasn't updated to handle
this. It passes `nil` to `load`, causing this type error.

Amend: 775ee2f04a
2023-02-21 20:23:47 -05:00
Henrik Lissner
8f50ead5c8
fix(lib): doom/bumpify-diff: remove duplicates 2023-02-21 19:37:16 -05:00
TEC
33af29f7d5 feat(docs): use header-line for header info 2023-02-21 18:35:15 -05:00
Henrik Lissner
986573a4a2
perf(lib): dir!: unset file-name-handler-alist
file-name-directory consults this variable for alternative strategies,
which is unnecessary work. (file!) won't (and should never be used in
any context where it could) return anything but a simple file path.
2023-02-21 03:30:51 -05:00
Henrik Lissner
d24e197964
fix(lib): doom/bumpify-diffs missing packages
This command would skip over consecutive package! statements in the
generated commit message. This commit fixes that.

That said, this command is still a temporary measure until formal bump
CI/CD is done, but should make dealing with doom/bumpify-diffs and
doom/commit-bumps a little less painful.
2023-02-21 00:35:17 -05:00
Alexey Nesterov
06c794faf5
fix(lib): don't overwrite kill-ring on doom/backward-kill-word
When calling backward-kill-word (which is in turn is calling kill-new),
not only kill-ring variable should be overridden, but also
kill-ring-yank-pointer.

Otherwise when deleting a word backwards, kill-ring pointer is moved and
next yank will insert (not so expected) rubbish.
2023-02-20 20:21:59 -05:00
Henrik Lissner
0aaad1900b
bump: compat
emacs-compat/compat@01fdf316a4 -> emacs-compat/compat@38280a7b54

- Switching to emacs-compat/compat so we can more closely follow the
  source. The emacs-straight mirror can sometimes lag too far behind to
  promptly address major issues.
- This, combined with 67b3d5a, should address odd byte-code issues to do
  with compat (usually to do with magit).

Ref: 67b3d5a20486
2023-02-20 19:01:39 -05:00
Henrik Lissner
7260725313
refactor: move compat package to core
This package is cropping up in packages everywhere. Managing it has been
a source of issues, so I'm making it a core package until v3, where
we'll be able to pin packages without explicitly installing them.
2023-02-20 19:01:38 -05:00
Henrik Lissner
52d413f448
fix(cli): rebuild dependents when updating packages
Library packages (like compat and transient) offer macros. Therefore,
any package that uses them (dependents) needs to be recompiled when
these are updated, but straight currently doesn't do this. As a
temporary workaround, this commit forces dependents to be rebuilt after
updates.

This is a bit too brute-force, but will do until v3, which will manage
dependency graphs and their complexities more efficiently.
2023-02-20 19:00:45 -05:00
Henrik Lissner
b0f91f6403
fix: void-variable native-comp-deferred-compilation-deny-list
In later versions of Emacs 29, this variable has been renamed without a
deprecation alias, causing void-variable errors wherever it is used.
Since it could potentially be used outside of Doom, I'll use a variable
alias until we formally drop 28 support (not for a long time).

Close: #7090
Co-authored-by: AdoPi <AdoPi@users.noreply.github.com>
2023-02-20 19:00:45 -05:00
Henrik Lissner
c6b3a81da0
fix(cli): recommend "checkout main" option if prompted
In case straight prompts something like the following:

    > In repository "git-modes", HEAD on "master" is behind default branch "main"

         1) Abort
         2) Checkout "main" (Choose this if unsure)
         3) Magit log "master..main" and open recursive edit
2023-02-20 19:00:45 -05:00
Henrik Lissner
4513efe159
bump: :core
Fuco1/smartparens@8b6a3c3b31 -> Fuco1/smartparens@7afd647395
Wilfred/helpful@6633d82c6e -> Wilfred/helpful@94c25337b2
Wilfred/helpful@6633d82c6e -> Wilfred/helpful@94c25337b2
bbatsov/projectile@20aa2adccc -> bbatsov/projectile@e18ad4d611
domtronn/all-the-icons.el@4a4d6269b8 -> domtronn/all-the-icons.el@51bf77da1e
emacs-straight/project@2e8da1b811 -> emacs-straight/project@e086bdc7c5
joddie/pcre2el@0b5b2a2c17 -> joddie/pcre2el@38c6f80c78
radian-software/straight.el@3eca39dfc6 -> radian-software/straight.el@56a8b6c8a4
2023-02-18 15:27:49 -05:00
Henrik Lissner
2c652259a5
tweak(lib): open file after doom/copy-this-file
As mentioned in #6964, it's rare for anyone to want to copy a file
without opening the new file.

Close: #6964
2023-02-18 15:27:48 -05:00
Henrik Lissner
7bf5938c66
fix: relative paths for add-load-path!
Because (dir!) was being expanded too early (at macro expansion time)
rather than runtime.
2023-02-18 15:27:47 -05:00
Amos Bird
0bc06fc0d3 fix: correct name of doom-after-modules-init-hook
The old name is doom-after-init-modules-hook.
2023-02-18 00:51:54 -05:00
Cullan Springstead
7ba11a62ef fix(cli): make doctor load module doctor files
Amend: 5a5195b84d
2023-02-18 00:45:33 -05:00
Itai Y. Efrat
54c4340740 fix(lib): consult case of doom--help-search
advise consult--ripgrep-make-builder instead of reimplementing
2023-02-17 12:34:26 -05:00
Rafael
3f3200f98d bump: :core
radian-software/straight.el@e20a44c4ac -> radian-software/straight.el@3eca39dfc6

Fix: #6960
2022-11-28 05:40:35 +01:00
Henrik Lissner
f9888c21e6
tweak(cli): doom sync: don't purge straight builds by default
This allows for more rapid 'doom sync'ing when testing different module
combinations, but puts the onus on the user to run `doom sync
--purge` (or `doom purge`, which will later be renamed `doom gc`) to
prune orphaned packages/repos.
2022-10-29 01:57:43 +02:00
Henrik Lissner
a2b02942f8
fix: void-function set-fontset-font error
Due to some packages and modules using this in some (non-GUI) builds of
Emacs. display-graphic-p isn't enough here, so rather than police all
the possible offenders, I've defined it to no-op in those cases,
instead.

Close: #6876
2022-10-29 01:57:42 +02:00
Henrik Lissner
a1f8063485
fix(lib): package! not overriding defaults
This regression was introduced in 5a5195b; it broke `package!`s ability
to override the recipes of packages declared by other modules, due to
some API assumptions that aren't true yet (in unpushed post 3.1 work).

Amend: 5a5195b84d
Fix: #6901
2022-10-23 02:30:13 +02:00
Raymond Huang
aac3c15cde
fix: change warning-suppress-types to list of lists
warning-suppress-types' pre-29 documentation suggests that it accepts a
list of symbols, but a recent, upstream correction changes this.

Ref: emacs-mirror/emacs@d5ee49c25c
Amend: 8c442d84b9
2022-10-05 15:14:12 +02:00
Henrik Lissner
4a2cbc903d
fix(lib): doom-module-locate-path: cannot locate exact files
One such casualty of this bug is that 'SPC h d m' (doom/help-modules)
could not find README.org files for disabled modules.
2022-10-03 14:13:39 +02:00
Henrik Lissner
f93003a9a2
refactor!(lib): remove eval-when-compile!
BREAKING CHANGE: Removes the eval-when-compile! macro. I recently
discovered cl-eval-when and it serves this macro's purpose well
enough (and is autoloaded+built-in).

This macro wasn't used anywhere in (published) Doom code, however, and
users shouldn't really be using it, so its removal is unlikely to cause
any actual breakage.
2022-10-03 14:12:33 +02:00
Henrik Lissner
ba35f12be4
release(modules): 22.10.0-dev
Ref: 2b39e41368
2022-10-02 19:13:58 +02:00
Henrik Lissner
ff9602ef75
fix(lib): revert add-transient-hook! refactor
a4b5831 removed this let-binding because I expected the function to
capture it, which seems to be the case in general, except for #6865.
Since add-transient-hook! could conceivably be used in an elisp file
with lexical-binding off, I'll take fewer chances and live with a little
redundancy.

Amend: a4b58311da
Fix: #6865
2022-10-02 19:08:53 +02:00
Henrik Lissner
6eab48641f
fix: disable non-essential startup optimizations in debug-mode
As to not interfere with debugging.
2022-10-02 18:46:37 +02:00
Henrik Lissner
d8d06390d2
fix(profiles): ensure trailing / on user-emacs-directory
To quote `user-emacs-directory`'s docstring:

> Note that this should end with a directory separator.

However, users may forget to add one in their profile configs, which
will cause errors.

Fix: #6608
2022-10-02 18:46:37 +02:00
Henrik Lissner
a6f0bf3123
fix(lib): infinite recursion in doom-first-*-hook
It's possible for these hooks to be triggered recursively, such as in
the case of emojify's "Emoji images not available should I download them
now?" prompt (reported upstream).

Fix: iqbalansari/emacs-emojify#100
2022-10-01 17:09:15 +02:00
Ken Bolton
e9a1908e0d
docs(cli): doom upgrade: s/-f/--force
Fix: #6712
2022-09-30 22:59:37 +02:00
Ivan
850907ed9a
fix(lib): doom/delete-this-file nil path handling
Fix the handling of a nil path within doom/delete-this-file.

If path is nil (e.g. called interactively when buffer is not visiting a
file), avoid calling abbreviate-file-name on nil, otherwise an error
will be signaled:

  (wrong-type-argument stringp nil)

Additionally, fix the subsequent path checks. These were treating two
distinct scenarios as a "Buffer is not visiting any file" user-error:

- nil path
- non-existent path
- Only the first should result in that error. The second should proceed
  to the next path check (which was previously unreachable), to signal
  the appropriate error, "File doesn't exist: %s".
2022-09-30 22:48:59 +02:00
Henrik Lissner
285b460c80
fix: module load order
A mistake in 5a5195b caused modules without an explicit :depth to be
loaded in the wrong order (because their final depth wasn't cached
correctly, and so were all given a depth of 0, thus falling back on
their insertion order, which is precisely what 5a5195b was trying to
fix). This commit fixes that and changes the module cache vectors to
match the structure of doom-module-context, for consistency.

Amend: 5a5195b84d
Fix: #6813
Fix: #6859
2022-09-29 17:35:59 +02:00
Henrik Lissner
9f512a60bf
nit: mention test env for startup optimizations
And remove "debug-mode" clause because of c20ba77.

Ref: c20ba77ff7
2022-09-29 17:35:56 +02:00
Henrik Lissner
71f7e4b5b8
perf: defer resetting inhibit vars further 2022-09-26 12:41:00 +02:00
Henrik Lissner
fbe94ba9f2
perf: inhibit display-startup-screen 2022-09-26 12:39:10 +02:00
Henrik Lissner
95bdc3b566
fix(lib): doom/reload-*: void-function doom-with-context
This macro used to be `doom-with-context`, but was renamed in the middle
of backporting f9201eb218, but these references were missed.

Fix: #6849
Amend: f9201eb218
2022-09-26 12:06:42 +02:00
Henrik Lissner
3f16c82877
fix(cli): doctor: false positive 'X.elc is out-of-date' warnings
The doctor would look for stale byte-code in *all* build directories,
which was excessive and produced many false positives for folks who use
multiple versions of Emacs or have recently up/downgraded.
2022-09-26 02:09:20 +02:00
Henrik Lissner
07171185bb
fix: doom-module-context: nil doom-module-context
If a module isn't enabled, this should silently set the context to an
empty array, not nil, which causes a (aref nil 2) type error.
2022-09-26 02:08:07 +02:00
Henrik Lissner
b8038e93cf
fix: doom-package-list: failures to resolve module context
doom-module-from-path fails to deduce the module from some paths (it
seems to struggle with doom-user-dir in some cases), causing a (aref nil
2) error (see #6845).

Fix: #6845
2022-09-26 02:08:00 +02:00
Henrik Lissner
39b8934236
fix(lib): package! error from doom/bump-* commands
package! complains that "package! can only be used in packages.el
files".

Amend: 4efaf6837b
Amend: f9201eb218
2022-09-25 19:18:05 +02:00
Henrik Lissner
d362490d45
fix(docs): if doom-emacs-dir doesn't end w/ slash
Doom is slowly transitioning away from requiring that its doom-*-dir
variables end in a slash (see two refs below), but there are some
vestiges of it left. This is one of them.

Fix: #6842
Ref: 00e8f6b72a
Ref: b914830403
2022-09-25 18:21:32 +02:00
ivanbrennan
2bb7e8d018 fix(lib): doom-info symlink-path
The `if` clauses were swapped, such that a non-symlinked path was shown
like,

  ~/.config/emacs/ -> ~/.config/emacs/

and a symlinked path was shown as,

  ~/.config/emacs/
2022-09-25 18:18:00 +02:00
Henrik Lissner
2645ed491b
perf: autoloads: remove definition-prefixes & abbreviate paths
Reduces the file size of the autoloads path by ~5%, memory usage by ~7%,
and buys around ~30-50ms in startup time.
2022-09-25 17:52:07 +02:00
Henrik Lissner
5222612527
refactor(cli): reorganize CLI library
* lisp/cli/help.el (doom help): move to lisp/cli/meta.el, and add :dump
  definition.
* lisp/doom-cli.el:
  - (doom-before-init-hook): trigger hook after the file is done
    loading.
  - (doom-cli-backtrace-depth, doom-cli-straight-error-lines,
    doom-cli-benchmark-threshold): rename these variables' prefix from
    `doom-cli-` to `doom-cli-log-`.
  - (doom-cli--plist): rename to doom-cli--group-plist, to better clue
    in what changes it.
  - (doom-cli-context-parse): remove unused letbind (argsleft).
  - (doom-cli-create-context-functions, doom-cli-before-run-functions,
    doom-cli-after-run-functions): define with defcustom instead of
    defvar, to indicate that they are (especially) intended for end-user
    configuration.
2022-09-25 17:52:07 +02:00
Henrik Lissner
a29041735c
tweak(cli): read $DOOMPATH like $EMACSLOADPATH
$EMACSLOADPATH is read to pre-fill load-path. Empty entries therein are
substituted with the default value of load-path. I am mirroring this
behavior with the $DOOMPATH variable.
2022-09-25 17:52:07 +02:00
Henrik Lissner
1a1e7b808b
fix(cli): doom env: deny DOOMPROFILE more precisely
The former regexp was too permissive. Not that it was an issue, but it's
one thing less to worry about.
2022-09-25 17:52:05 +02:00
Henrik Lissner
1cddb5c369
fix(cli): doom doctor: void-variable key error
A regression introduced in 4efaf68, cause by an incomplete refactoring
of the loop, where not all instances of `key` were changed into `group`
and `name`.

Amend: 4efaf6837b
Fix: #6840
2022-09-25 11:43:00 +02:00