Commit Graph

355 Commits

Author SHA1 Message Date
f923ed4341 Add docstrings to doom-inhibit-switch-*-hooks vars 2018-08-17 04:34:43 +02:00
deea5f11b3 Fix enter/exit window/buffer hook names 2018-08-17 04:01:46 +02:00
4a4b012b5d Move custom hooks to core/core.el
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!
2018-08-17 01:57:09 +02:00
25d9786edf Add early-init-file support to doom/profile-emacs #788
And fix wrong-type-argument: stringp errors when running esup.

Also ensure that doom|run-all-startup-hooks sets after-init-time.
2018-08-13 03:47:33 +02:00
36044fccc9 defconst -> defvar for global constants
So they can be changed prior to being defined (e.g. for
doom/open-vanilla-sandbox).
2018-08-12 02:45:28 +02:00
6eafdd7c62 Refactor module load process
doom! no longer loads modules, it only sets
doom-modules (incrementally).

Instead, modules are loaded by doom-initialize-modules (which makes more
sense).
2018-08-08 23:37:30 +02:00
f88a97177c Rename doom-ensure-core-directories
Give it a more descriptive name
2018-08-08 23:37:30 +02:00
ea0f46b181 Add 2nd arg to doom-initialize to load core libs
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).
2018-08-03 16:35:42 +02:00
f16597ec72 Set gamegrid-user-score-file-directory
THIS IS IMPORTANT GUYS
2018-08-02 17:06:30 +02:00
f3a3465c04 history-length = 250
Reduce from 500 to slim savehist data files and general Emacs memory
footprint.
2018-07-29 17:41:59 +02:00
4941e327f4 General refactor for readability
+ Removes redundant/unhelpful comments
+ Renames functions, hooks and variables to be self-documenting
+ Use add-to-list to ensure idempotency (and is more performant)
2018-07-09 15:33:31 +02:00
3d3d04b21c Move use-package config to core-modules 2018-06-20 12:48:59 +02:00
1efb0a8298 Rename core-dispatcher -> core-cli
The file's role is easier to guess at a glance.
2018-06-20 12:04:11 +02:00
151858a8dc Redesign Doom error handling
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.
2018-06-20 02:07:12 +02:00
84756b33a0 Fix closure symbolp errors blocking stacktraces
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
2018-06-20 01:59:07 +02:00
600d7bcb4f core: minor refactor/reformat
+ Prefer cl-loop over cl-mapcan for performance reasons.
+ Remove unnecessary let form
+ Log doom-try-run-hook when doom-debug-mode is on.
2018-06-19 20:55:44 +02:00
0fefc43d39 Refactor autoloads init & error handling
Also reduces byte-compiled forms in the backtrace of a
doom-autoload-error.
2018-06-19 17:19:11 +02:00
2c1b0ccaf8 Fix doom|run-all-startup-hooks
Wasn't using doom-try-run-hook correctly.
2018-06-19 12:01:51 +02:00
4685eddb66 Don't eat stacks in backtraces in debug mode
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.
2018-06-18 17:14:17 +02:00
32954ecb69 Move compile-time fix for disabled packages
This fix prevented the byte-compiler from trying to load packages that
were disabled or failed their :when/:unless/:if predicates. This commit
moves it into doom-byte-compile, so the :no-require predicate doesn't
have to run on every package in an interactive session, eating MY
PRECIOUS cpu cycles.

I do love my cpu cycles, yessiree.
2018-06-18 14:52:24 +02:00
ab07e07352 Improve general error handling at startup
This will hopefully reveal more information as to the cause and origin
of errors at startup. It should also make doom-debug-mode more likely to
produce a backtrace in non-interactive sessions.
2018-06-18 14:47:36 +02:00
0d925cda5e Load core-os sooner & in all sessions
Indirectly fixes set-env! errors when using it from your init files.
2018-06-18 12:04:30 +02:00
26caea7f2b Move doom-docs-dir to core.el 2018-06-17 21:39:40 +02:00
03022d09f9 Remove doom//x naming convention
This naming convention was meant to be for batch commands, but it grew
to include "commands that were helpful with managing Doom", but many of
these commands shouldn't be interactive in the first place!
2018-06-17 21:35:58 +02:00
1184967531 Advise symbol-file to return doom-file property
...if it exists. Otherwise fall back on original functionality. This
allows certain symbols to overwrite where Emacs thinks they were
defined.

Warning: only use this for autodefs! It may have unintended side-effects
for other symbols.
2018-06-15 16:20:20 +02:00
bbda434365 Move startup optimizations into init.el
Doesn't really belong in core.el and only applies to interactive
sessions.
2018-06-15 16:20:20 +02:00
db8b4091dd Fix bin/doom ignoring -d flag
defconst -> defvar
2018-06-15 00:25:39 +02:00
04ec62c8f2 General, minor refactor & feedback revision 2018-06-14 19:49:03 +02:00
933023d779 Minor reformatting & docstring revision in core.el 2018-06-13 22:16:08 +02:00
85591ca296 Move custom-file into local-dir (not etc-dir)
Makes more sense to put more vital files in local than etc or cache.
2018-06-12 12:17:33 +02:00
4425fdfca4 defvar -> defconst for dir vars 2018-06-12 01:48:09 +02:00
4c40195d40 Slightly better version check error 2018-06-12 01:47:43 +02:00
0741c8851a Split core-packages into two (packages & modules)
+ Move doom-initialize et co into core.el
+ Lazy load core-packages
+ load! has been moved into core-lib
+ Added FILE! and DIR! macros
+ Fix package! not returning correct value when package is disabled
+ Remove :disabled support for def-package-hook! officially
2018-06-12 00:02:04 +02:00
2605a3938e Initialize modules conditionally
doom-modules will be initialized on demand in non-interactive sessions.
2018-06-10 17:28:17 +02:00
01d1a814f9 Refactor doom-initialize functions
Removes doom-module-table; which was inflexible (though more stable). It
prevented you from putting your doom! block in anywhere but
~/.doom.d/init.el.

It is replaced (somewhat) by (doom-modules).
2018-06-10 17:30:26 +02:00
81c465a545 Move OS constants to core/core.el
So it is universally available to all of Doom, rather than excluding
sessions that haven't called doom-initialize interactively.
2018-06-08 13:31:45 +02:00
b26bbd4762 Fix args-out-of-range in enable-minor-mode-maybe
Caused by trying to use out-of-scope match data.
2018-06-07 02:51:03 +02:00
dd3872dd32 Add DOOMDIR envvar
So doom-private-dir can be customized via shell dotfiles (or chemacs).
2018-06-05 17:20:20 +02:00
1d9ae834f2 Minor refactors & docstring revision
These are not the refactors you are looking for.
2018-06-04 21:17:49 +02:00
8b7888d58f Increase GC threshold from 8 to 16mb 2018-05-30 19:15:43 +02:00
3f6bfee027 Remember customized settings (load custom-file) 2018-05-30 19:15:29 +02:00
f8b9cff4aa Get rid of doom-pre-init-hook 2018-05-28 16:07:11 +02:00
a55e2251e6 auto-mode-case-fold = nil
This disables the case insensitive second pass through auto-mode-alist
on case sensitive systems.
2018-05-24 21:20:02 +02:00
8746c12fae Redesign Doom bootstrap, caching & autoload generation logic
The autoloads file has been split into doom-autoload-file and
doom-package-autoload-file. The former is for Doom's modules and
standard library; the latter is for compiling all package autoloads like
load-path and auto-mode-alist (among other things).

This reduced my startup speed from ~1s to ~0.5s
2018-05-24 21:20:02 +02:00
5d42b1512b Fix naive path concatenation for doom-private-dir #513 2018-05-24 11:49:01 +02:00
b452aded76 Mention doom-emacs-dir must end with a slash 2018-05-24 11:44:17 +02:00
ac5eaf0fb3 Load core-lib before core-package
So that core-package may use the Doom standard library.
2018-05-21 01:38:17 +02:00
6f5e710d98 Refactor startup process, hooks, doom-initialize & doom!
+ Brings back doom-pre-init-hook and doom-post-init-hook hooks.
+ Extracts autoload file loading logic into doom-initialize-autoloads
  function.
2018-05-19 23:59:55 +02:00
17d5721102 Minor reformatting of core startup config 2018-05-19 23:49:25 +02:00
a19a64b16b Complain if using Emacs <25
More helpful than advice-add errors.
2018-05-19 18:01:54 +02:00