Emacs 29+ introduced the setopt macro for setting defcustom variables in
a way that takes setters and type-constraints into account, but it
eagerly pulls in a symbol's dependencies before doing so. To side-step
this silliness, use Doom's setq! macro instead. I'm tempted to alias
setopt to it...
setenv treats the TZ (and only TZ) envvar especially, so we have to too,
since I'm intentionally avoiding iteratively setenv'ing envvars to avoid
the unnecessary extra work it does.
Fix: #5760
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))
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)).
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.
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)))
...)
Prior to this, (after! (a b) ...) would expand to
(after! b
(after! a
...))
After this, it expands to
(after! a
(after! b
...))
This fixes load order issues with packages whose deferred configs are
nested, such as org and ob-ditaa.
Ref https://www.reddit.com/r/emacs/comments/pp3sye/hd311nz
Emacs 27.x has been the stable version of Emacs for nearly a year, and
introduces a litany of bugfixes, performance, and quality-of-life
improvements that significantly reduce Doom's maintenance burden (like
XDG support, early-init.el, image manipulation without imagemagick, a
native JSON library, harfbuzz support, pdumper, and others).
With so many big changes on Doom's horizon, I like having one less (big)
thing to worry about.
Also reverts bb677cf7a (#5232) as it is no longer needed.
Straight (on its develop branch) byte compiles packages in a child
process, isolated from the current session. This is a sensible approach
and I applaud it, but there's a problem:
Some packages don't load their compile-time dependencies at
compile-time, causing errors *at* compile-time. They unwittingly rely on
the fact that package.el compiles them in the same session as their
dependencies, which indirectly loads their macros for them. I can't
depend on package authors to do the right thing, but I can force
straight to revert to the old approach.
This is a temporary fix. These should be removed once packages have
updated to accommodate the changes to the
define-obsolete-{variable,function,face}-alias macros.
Currently, `add-load-path!` doesn’t check for duplicates in `load-path`, because `cl-pushnew` tests for equality with `eql`. This changes the predicate to `string=`, fixing the bug.
This should at least report what function invoked the error.
doom-first-input-hook was especially problematic because it runs on
pre-command-hook, which Emacs is very protective of. It will smother
errors that arise from it and auto-remove the offending hook. This
self-correction is nice for avoiding a broken Emacs, but it makes it
tough to debug those issues.