Commit graph

5071 commits

Author SHA1 Message Date
Gerry Agbobada
8d360474ac
docs: add doctor for dev versions of Emacs
The message simply test for the "not-a-version-yet" patch number and
displays an explanation to prepare users for raised error frequency and
having a backup version of Emacs if they do not want to deal with
issues.
2021-11-20 18:32:59 +01:00
Henrik Lissner
3a669d8daa fix(lib): add-hook! fails when passed a quoted list
Fix: #5779
2021-11-20 00:55:24 +01:00
Daanturo
d67060eda4 fix: use advise-add instead of fset to override yes-or-no-p
So that reverting it becomes easier.
2021-11-18 19:09:09 +01:00
Henrik Lissner
06f1e24eda fix: renamed doom-inhibit-local-var-hooks
This rename was premature; it snuck into 68d8364.

Amend: 68d8364aea
Close: #5755
2021-11-17 23:19:10 +01:00
Daanturo
b4cc1c84d8
fix: wrong-number-of-args error on dtrt-indent-mode
doom--fix-broken-smie-modes-a forces dtrt-indent-mode to expect exactly
one argument so an error will be raised when the latter is turned on
without args programmatically in lisp.
2021-11-07 01:53:17 +01:00
Henrik Lissner
bac7ccb970 dev(ci): minor refactor & reformatting 2021-11-04 01:43:50 +01:00
Henrik Lissner
710eab10c7 dev(ci): suppress summary length warnings for bump/revert commits 2021-11-04 01:43:10 +01:00
Henrik Lissner
d6262dd287 dev(ci): check all module dirs for valid scopes
Will become relevant once Doom's modules have been moved to their own
repo.
2021-11-04 01:42:43 +01:00
Itai Y. Efrat
aa2f806b5b dev(ci): fix false negative in commit linter
The one value allowed per trailer check shouldn't apply to names since
they often have spaces.
2021-10-30 19:09:50 +03:00
Itai Y. Efrat
ea18315d08 dev(ci): allow periods in names in commit linter
For initials.
2021-10-30 17:51:28 +03:00
Henrik Lissner
2eaa508121 dev(ci): fix false positive invalid trailers 2021-10-28 14:32:36 +02:00
Henrik Lissner
481646ca18 nit: update doom--write-to-sane-paths-a docstring
To properly reflect what it actually does, not what a long-since-changed
implementation did.
2021-10-28 14:32:36 +02:00
Henrik Lissner
b0438f1589 fix: wrong-type-arg error on startup
Regression caused by change to doom-enlist in b35b32273.

Amend: b35b32273a
2021-10-20 22:06:25 +02:00
Henrik Lissner
e4aecd1a5a dev(ci): refactor & update commit linter
This generalizes and cleans up the linter API so that it can be used in
other Doom projects (or CLI commands, like our WIP changelog generator).

Besides that, our git's commit conventions saw two changes:
- A new 'Amend' keyword, for indicating a commit corrects an earlier,
  recent one. This should be used to omit (or merge) commits in the eyes
  of the changelog generator.
- Trailers must now follow the 'KEY: VALUE' format, which is supported
  OOTB by 'git interpret-trailers' and makes scraping them much eacher.
  Before, omitting the colon was mandatory, this is no longer the case.

Other highlights:
- For linter rules: replaced :footer and :refs keys with :trailers (a
  string->string alist). Invalid trailers will be left in BODY's tail.
- Added a linter for colon delimiters in commit trailers (along with
  other formatting checks, like capitalization and one-per-line checks).
2021-10-20 21:37:09 +02:00
Henrik Lissner
b35b32273a fix(lib): doom-enlist not wrapping cons cells
While lists are technically cons cells, cons cells don't have all the
properties of lists, so doom-enlist shouldn't treat it as one.

Before:

  (doom-enlist '(a . b))   #=> (a . b)

After:

  (doom-enlist '(a . b))   #=> ((a . b))
2021-10-20 20:18:39 +02:00
Henrik Lissner
8f040b79be fix(lib): fn! error when arglist is a cons cell
Throws a wrong-type-argument error when fn! is given a cons cell in its
arguments, e.g.

  (fn! ((x . y)) ...)
2021-10-19 22:29:08 +02:00
Henrik Lissner
6bd7ec7579 dev(ci): generalize commit parser
These will be useful for our various CI facilities later. E.g. our
conventional changelog generator and package bumper CI/CD.
2021-10-18 12:09:42 +02:00
Henrik Lissner
4d20fc65cd bump: :core
bbatsov/projectile@17c152b062 -> bbatsov/projectile@7f64570d3e
hlissner/ws-butler@2bb49d3ee7 -> hlissner/ws-butler@572a10c11b
noctuid/general.el@a0b17d207b -> noctuid/general.el@26f1d4c4e2
raxod502/straight.el@45eb6112b2 -> raxod502/straight.el@f81d9b755f

Fix #5619
2021-10-18 01:15:54 +02:00
Henrik Lissner
1a86b0fc0f fix(cli): deploy git hooks to correct directory
'doom install' now consults git to find the hooks directory, which will
work for users who have Doom as a submodule (#5632).

Fix #5632
2021-10-18 01:15:54 +02:00
Henrik Lissner
ff854157a6 fix(lib): package URL in documentation
Fixes [[doom-package:*]] links in (future) docs and always displays a
homepage URL in 'SPC h p' (or 'C-h p') package docs.
2021-10-18 01:15:54 +02:00
Henrik Lissner
0112319c04 fix(lib): add &allow-other-keys in fn! sub-arglists
Before this fix:

  (fn! (x &key y z))
  ;; implies
  (fn! (&key x &allow-other-keys)).

But

  (fn! (x (&key y) &key z))
  ;; would not imply
  (fn! (x (&key y &allow-other-keys) &key z &allow-other-keys)).
2021-10-18 01:15:54 +02:00
Henrik Lissner
db09cb001f perf: inhibit redisplay when loading modules
Some packages my force a redraw for no good reason.
2021-10-18 01:15:54 +02:00
Henrik Lissner
b36d798f74 fix: restore auth-sources default
This was accidentally removed in 68d8364.

Ref 68d8364aea
Fix #5628
2021-10-18 01:15:09 +02:00
Henrik Lissner
a33865569e fix: premature deprecation of *-local-vars-hook
68d8364ae added a deprecation notice to any use of a
MODE-local-vars-hook, instructing users to use after-MODE-hook instead,
however this hasn't been decided yet and shouldn't have made it into
68d8364ae.

Ref 68d8364aea
Fix #5612
2021-10-11 20:25:18 +02:00
Henrik Lissner
ade96ed515 docs(lib): clarify type of add-hook!'s first arg 2021-10-11 20:25:18 +02:00
Henrik Lissner
b47440010f docs: add EMACSDIR == DOOMDIR doctor check 2021-10-11 20:25:15 +02:00
Henrik Lissner
4eeb3c7a19 fix: wrong-number-of-args error on font init
set-frame-font's fourth argument was introduced in 28 and shouldn't be
used yet.

Fix 2614df72bd
2021-10-10 21:40:53 +02:00
Henrik Lissner
114841bfd2 refactor: defer UI init a little longer at startup
Fixes a regression introduced in 0bb4d4dfc, which changed how
doom-switch-buffer-hook works, but makes it fire too early during
startup, eagerly loading packages that wait for the first interactively
opened buffer. This moves doom-init-ui-h to
window-buffer-change-functions, which fires once at the end of startup,
when any buffer is displayed for the first time in the session.

Ref 0bb4d4dfcb
2021-10-10 18:58:32 +02:00
Henrik Lissner
0bb4d4dfcb refactor: switch buffer/frame/window hooks
Emacs 27 introduced a bunch of `window-*-change-functions` hooks,
including `window-selection-change-functions` and
`window-buffer-change-functions`, which handles 98% of the use case for
Doom's `doom-switch-{buffer,window,frame}-hook` hooks, so I've rewritten
them to use them under the hood, which amounts to simpler code and fewer
hacks.
2021-10-10 18:36:46 +02:00
Henrik Lissner
2614df72bd refactor: font, theme, & UI init
Use the new server-after-make-frame-hook, introduced in Emacs 27.1, to
clean up how we initialize fonts, themes, and the UI in general.

This may indirectly fix font issues in daemon sessions.
2021-10-10 18:36:46 +02:00
Henrik Lissner
3bcee249d3 fix: side-effects unset backup-directory-alist 2021-10-10 18:36:46 +02:00
Henrik Lissner
f5c1332a31 refactor: minor refactors & nit picks across core 2021-10-10 18:36:46 +02:00
Henrik Lissner
432ca05c4f tweak(cli): improve backtrace formatting 2021-10-10 18:36:46 +02:00
Henrik Lissner
3854c2fd70 dev(ci): deploy git hooks on 'doom install' 2021-10-10 18:36:46 +02:00
Henrik Lissner
3831096cfb fix(lib): doom-package-depend{ing-on,encies}
Doom doesn't use these two functions, but since they can be useful for
debugging *and* straight provides impleemntations for them already,
they're trivial to fix.
2021-10-10 18:36:46 +02:00
Henrik Lissner
281ee1d27b feat(lib): add doom/remove-recent-file
To interactively remove a file from your recentf list. (Perhaps similar
could be added to embark for consult-recent-files?)
2021-10-10 18:36:46 +02:00
Henrik Lissner
6bd9c7c880 perf: run GC a little less aggressively
The delay will not be adjusted on a per-GC basis, depending on its last
run-time. This should average to around 2-3s, which should be a good
compromise between GCing too often and too infrequently.
2021-10-10 18:36:46 +02:00
Henrik Lissner
68d8364aea refactor: adopt CalVer and reorganize core.el
Doom is adopting CalVer (starting at 21.12) and, later, I'll move Doom's
core out to a separate repo, where it'll stay with SemVer (starting at
3.0).
2021-10-10 18:36:46 +02:00
Henrik Lissner
094b4c1023 refactor: move init helpers to core-lib
The functions have more general use-cases and should be considered part
of Doom's stdlib.
2021-10-10 18:36:46 +02:00
Henrik Lissner
91770b66e5 feat(lib): add :depth support to add-hook!
The semantics of add-hook's APPEND argument changed in 27.1: it was
replaced with DEPTH, which controls its exact order of the hook (and is
respected every time a function is added to a hook, throughout its
lifetime).

Includes a general refactor for add-hook! too.
2021-10-10 18:36:46 +02:00
Henrik Lissner
1ebac6f798 fix: fonts not scaling in childframes
On doom/increase-font-size and doom/decrease-font-size.

Fix #5591
2021-10-06 23:38:11 +02:00
Henrik Lissner
0b07264619 dev(ci): allow capitalization in revert commits
In case you're reverting an old commit, from before we adopted our git
conventions.
2021-10-06 01:30:45 +02:00
Henrik Lissner
5678a837dd fix(cli): void-variable comp-native-version-dir
There weren't enough checks that we were truly in a native-comp build of
Emacs. Not the most elegant solution, but the CLI rewrite handles this
far better so it'll do for now.

Fix #5131
2021-10-05 02:01:15 +02:00
Henrik Lissner
5541ee1c68 feat(cli): add -l/--load switch
Post-rewrite bin/doom will accept multiple -l's, but for now will only
accept one. This change was made to prepare for the documentation
generator, which will live outside the repo.
2021-10-05 02:01:15 +02:00
Henrik Lissner
ea404dfa45 fix(cli): rebuilding packages on every 'doom sync' 2021-10-03 19:24:46 +02:00
Henrik Lissner
328a145ffd fix(cli): void-variable comp-native-version-dir on 'doom purge'
This error would trigger on Emacs 28 (without native-comp).

Fix #5131
2021-10-03 12:08:42 +02:00
Henrik Lissner
d13816ce3e feat(lib): extend function deftypes in letf! macro
This adds support for two new definition types to the left! convenience
macro: defun* and defadvice.

First, defun* is for defining recursive, local functions (uses
cl-labels under the hood). e.g.

  (letf! (defun* triangle (number)
           (cond ((<= number 0) 0)
                 ((= number 1) 1)
                 ((> number 1)
                  (+ number (triangle (1- number))))))
    ...)

Second, defadvice is for defining temporary advice (which has a global
effect; it can later be improved to limit scope by redefining things
with cl-letf). e.g.

  (letf! (defadvice my-fixed-triangle (fn number)
           :around #'triangle
           (funcall fn (1+ number)))
    ...)
2021-10-01 19:30:56 +02:00
Henrik Lissner
0381c7868e fix: doom/reload not restoring initial envvars
'doom/reload' should and cannot regenerate the user's envvar file,
because it's not typically running in your shell, but it should reload
your existing envvar file.

Fix #5399
Ref #5344
2021-10-01 18:20:16 +02:00
Henrik Lissner
3ad9e39559 fix(lib): doom/reload-theme not reloading active theme
Rather than reloading whatever `doom-theme` is set to, reload the
currently active theme(s). Although `load-theme` is advised to change
the value of `doom-theme`, not all theme switching commands use
`load-theme` (e.g. `consult-theme`).

Fix #5539
2021-09-30 15:06:57 +02:00
Henrik Lissner
49c94dc78c docs(ci): document doom-cli-commit-rules 2021-09-30 15:06:34 +02:00