Uses a less destructive method (the same that Spacemacs uses) than the
one introduced in 13cee68, by introducing MODE-local-vars-hook hooks,
which run after local vars have been initialized.
The old method was to call `hack-local-variables` *before* mode hooks
run, however, this causes variables set by modes to have higher
precedence than local vars, which is unacceptable.
Also moved intero-mode & dante-mode to haskell-mode-local-vars-hook
The default behavior is to read file+directory-local variables after the
major mode and its hooks have run. I think this is backwards. What if we
want to use these local variables to customize the things running in
hooks?
This does mean hack-local-variables will run at least twice when the
mode changes, but this is an acceptable compromise.
Hooks run with this should already be run in a gc-deferred state (at
startup), so deferring garbage collection _again_ may just cause
unnecessary consing.
This is for loading large packages (like org and magit) quietly in the
background during idle time. It is already set up to incrementally load
org and magit.
This is still experimental, however. the idle timers may need to be
tweaked.
Only add doom-private-dir to load-path during autoload generation,
otherwise a $DOOMDIR/autoload.el will shadow the built-in autoload.el
Emacs package.
Note: with `doom-private-dir' in `load-path', Doom autoloads files will
be unable to declare autoloads for the built-in autoload.el Emacs
package, should $DOOMDIR/autoload.el exist. Not sure why they'd want to
though, so it's an acceptable compromise for simpler autoload
declarations.
The defaults were designed for much, much older systems. We can safely
increase this to stave off premature abortion of intentional deeply
nested loops or excessive allocations.
+ Add doom-gc-cons-upper-limit variable
+ Don't use most-positive-fixnum, in case Emacs somehow wants to
allocate that much!
+ Don't use startup optimizations in noninteractive sessions
+ Restore gc-cons-threshold on idle timer, instead of hook (to defer the
possible GC pause and so deferred packages can take advantage of these
optimizations).
This was done to help the modeline build its file path in indirect
buffers, but this has been fixed by using buffer-base-buffer.
Both ui/modeline and ui/doom-modeline have been refactored to
accommodate this.
This change facilitates the users that prefer their custom-file
somewhere other than doom-local-dir (e.g. in ~/.doom.d/custom.el).
This change prevents loading both files during startup. Just change
`custom-file` and Doom will load it after your config.el is loaded (but
before doom-post-init-hook runs).
Possibly fixes recursive load errors, to do with
kill-buffer-query-functions and buffer-predicate autoloads loading in a
weird way on Emacs 25 (and especially on MacOS, for some reason).
Also ensures that the custom hooks aren't fired until as late as
possible, which prevents a few packages from prematurely loading at
startup. Faster startup! Yay!
doom! no longer loads modules, it only sets
doom-modules (incrementally).
Instead, modules are loaded by doom-initialize-modules (which makes more
sense).
This restores the correct value of noninteractive while core libs are
loading, so packages like recentf can avoid initializing when running
emacs non interactively (thus polluting output or possibly causing
errors).
+ Removes redundant/unhelpful comments
+ Renames functions, hooks and variables to be self-documenting
+ Use add-to-list to ensure idempotency (and is more performant)
Another refactor, again to improve the locality of doom errors and make
the data that accompanies them more useful in determining the origin and
source of issues. Also, bin/doom is now a little more informative about
how to debug errors.
Caused because of symbol-file advice assuming SYMBOL would always be a
symbol.
This would prevent backtraces from happening, making debugging
impossibly obtuse.
This may indirectly fix#701
The error handlers were a little too effective. They obscured a large
chunk of the stacktrace after errors, even in debug mode. This fixes
that and ensures backtraces in debug mode are more helpful.