Commit Graph

242 Commits

Author SHA1 Message Date
47d15fdf8a Make startup benchmark a little more accurate #353
Also sets doom-init-time first thing in doom-post-init-hook.
2018-01-13 15:11:28 -05:00
987805de5f Fix recursive load errors with multiple doom! calls #352 2018-01-12 14:40:34 -05:00
2b98e550e8 Reverse load-path to fix precedence issues
Originally, I built the load-path with site-lisp paths first, then
packages. There was a modest ~10% startup boost doing this, because
there were considerably more site packages loaded at startup than
plugins.

However, this meant built-in packages would get precedence over plugins,
which is undesirable. In org's case, I simply modified the load-path
in lang/org/init.el. However, this issue has cropped up again in #340.

Evidently, that 10% boost may not be worth the risk it imposes, so I've
rearranged the load-path with packages first.
2018-01-10 22:47:35 -05:00
42f4d10d6d Fix doom//reload-autoloads not reloading autoloads file
doom-packages--async-run doesn't return anything. Whoops!
2018-01-08 22:47:38 -05:00
25619908a2 Narrow down the purpose of init & post-init hooks
Essential hooks should be added to doom-init-hook. Non-essential and
extra hooks should be added to doom-psot-init-hook.
2018-01-07 00:15:58 -05:00
392f04446f General refactor (use map.el more)
+ map-delete is shorter and faster than assq-delete-all
+ map-put is simpler than the delete-then-set workflow
+ map-merge is great for merging default and user settings
2018-01-07 00:15:58 -05:00
379914ccd7 doom-initialize: letbind load-path to site load-path instead
PREMATURE OPTIMIZATION DETECTED.

EXTERMINATE. EXTERMINATE. EXTERMINATE.
2018-01-07 00:15:57 -05:00
e894c07453 Load module init.el too from require! macro 2018-01-06 04:14:44 -05:00
a568f95004 Fix doom//reload-autoloads #328
`get-file-buffer` returns nil if no buffer for that file already exists.
In an edge case on Windows, `update-file-autoloads` doesn't leave
a hanging buffer, possibly ignoring its SAVE-AFTER argument. Using
`find-file-noselect` fixes this, which will open a buffer if one doesn't
already exist.
2018-01-05 13:43:17 -05:00
2598d48bba Add org elpa archive + update lang/org #327
Now that the org ELPA archive has https support, we can add it to
package-archives. This fixes some 'org is unavailable' errors when
installing org packages that have declared earlier versions of org as
a dependency.

This also makes installing a newer version of org-mode much simpler.
Woo!
2018-01-04 16:16:45 -05:00
eef6ed3d11 Minor, general refactor & comment updates 2018-01-01 13:21:52 -05:00
79ca2b2911 Fix interactive usage of doom//byte-compile-core 2017-12-31 18:28:42 -05:00
9628b21d22 Fix async package functions not running from right cwd 2017-12-31 18:28:26 -05:00
a811c7ff12 core-packages: minor refactor of load! & def-package! 2017-12-28 19:15:50 -05:00
5789fb4511 Don't rerun doom init hooks on doom-reload-hook 2017-12-28 01:02:32 -05:00
89f07f88c5 General & minor refactor 2017-12-23 22:13:48 -05:00
6a0e4bd0db doom-initialize-packages: reinit packages after modules 2017-12-23 16:24:43 -05:00
9924a43506 Fix doom-module-pairs returning pairs in arbitrary order
This causes errors because of arbitrary module load order.  This happens
in Emacs 25.x, because hash-table-keys there uses maphash, while in
Emacs 26+ it uses cl-loop.
2017-12-23 03:26:32 -05:00
3bbb78f779 doom//byte-compile: better error handling (revert on error) 2017-12-22 17:05:01 -05:00
9a9f2ce036 Fix make clean printing long, relative paths in output 2017-12-22 16:26:08 -05:00
efc7ec38ae core-packages: general, minor refactor 2017-12-22 16:26:08 -05:00
6922fe11fe Refactor doom-initialize-packages 2017-12-22 16:26:08 -05:00
02c14f560d Refactor bootstrap process + add doom-initialize-load-path 2017-12-22 16:26:05 -05:00
6343e8ad85 (BREAKING) Don't host-namespace local files
Local cache and data files were stored in a parent folder named after
your host, because I'd symlink the same config across computers via
dropbox. This would cause byte-compile issues in packages, so I stopped
doing this.

Now that each computer gets its own clone, host-namespaced local
directories are unnecessary. There's no other benefit to having them.
2017-12-22 14:48:13 -05:00
a5596c8923 Ensure doom-autoload-file directory exists first 2017-12-22 14:30:31 -05:00
4e83cd516c Add unicode symbols to package management output 2017-12-20 20:07:46 -05:00
96a232b2ae Rename module library functions in core-packages
+ doom-module-loaded-p => doom-module-enabled-p
+ doom-module-flags => doom-module-get
+ Use load! for module config files, rather than require!
2017-12-10 16:59:10 -05:00
b14198dedf Extend byte-compile ;;;###if support to other elisp files 2017-12-10 16:57:51 -05:00
ae25e319b0 Silence 'cannot load' false positive errors when byte-compiling 2017-12-10 14:51:32 -05:00
76a4ae459d Fix obsolete (when|if)-let messages in Emacs 26 2017-12-10 14:49:52 -05:00
4450f08b0b Make async a core package again 2017-12-09 14:17:23 -05:00
346d7bdf36 Detect init.el in any module, instead of private user module
User module (named after user-login-name) is no longer automatically
loaded or detected, and must be explicitly mentioned in the doom! macro
of your emacs init.el file.

Also, any module can now have an init.el file, which will be run before
any modules are loaded.
2017-12-08 23:14:13 -05:00
df93fd8ce4 Refactor require! macro 2017-12-08 23:14:12 -05:00
9d81bc5a8b Major refactor: use-package-always-defer = nil & use :hook
Possibly breaking change: packages are no longer deferred by default.

Addresses #286
2017-12-08 23:14:11 -05:00
2cbd1b9107 Half-revert 01185352; we need use-package's newer features+bugfixes 2017-12-08 23:14:11 -05:00
b885164ce6 Update comments in core-packages 2017-12-04 13:43:04 -05:00
0118535267 Install core packages from melpa-stable
Use-package broke in a recent update, as with Doom, since it relies so
heavily on it. To combat this issue arising again, use-package will be
installed from melpa-stable from now on.

Addresses #283
2017-12-04 13:22:21 -05:00
2190d29960 Enable load-prefer-newer sooner in noninterative/debug sessions 2017-12-03 20:04:00 -05:00
1140af7807 Report missing module in require! macro 2017-12-03 20:04:00 -05:00
5364260a5c Report ignored files w/ reloading autoloads 2017-12-03 20:04:00 -05:00
f21c01fce2 predicate cookies: restrict to first 3 lines + set load-file-name 2017-12-03 20:03:55 -05:00
a8f4b6cb2c Fix 'No such server' errors in doom//reload-load-path #267 2017-11-14 15:32:11 +01:00
6def061c5a Minor refactor/comment corrections 2017-11-13 18:03:36 +01:00
eb01401513 Remove references to old package api 2017-11-13 17:58:16 +01:00
8e8ddeda5f doom--display-benchmark => doom-packages--display-benchmark 2017-11-08 22:51:55 +01:00
903ac3f0ef Run doom//reload-autoloads in separate session
Includes a minor refactor core/core-packages.el
2017-11-08 22:51:55 +01:00
e38f508ec1 doom--module-paths => doom-module-paths 2017-11-08 22:51:55 +01:00
211977e28a doom--module-pairs => doom-module-pairs 2017-11-08 22:51:55 +01:00
b4f9087022 Add docstring to doom//byte-compile-core 2017-11-08 14:42:22 +01:00
5f166d9297 Add --quick to Emacs batch calls (experimental) 2017-11-07 13:09:24 +01:00