Commit Graph

49 Commits

Author SHA1 Message Date
Henrik Lissner
f653e20407 Fix disabled autodefs defined with cl-lib
Stubs are defined as ordinary macros (with defmacro), but if an autodef
is defined with cl-defun, defmacro can't handle the clisp-style argument
lists, causing wrong-number-of-arguments errors.
2018-06-18 17:30:33 +02:00
Henrik Lissner
f6c7c13634 Clean up elcs only if compiling core or everything
Sometimes we only want to compile one module, without getting rid of all
our other compiled files.
2018-06-18 14:56:24 +02:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
4e5c8b6052 Improve autoload generator
Adds support for defalias and arbitrary forms.
2018-06-18 01:55:37 +02:00
Henrik Lissner
0a20159eee Check doom-packages-dir mtime
Now that package management commands update its mtime manually, this is
the most reliable method of detecting package changes.
2018-06-17 21:38:53 +02:00
Henrik Lissner
faf09288ce Major refactor of core-dispatcher 2018-06-17 21:38:30 +02:00
Henrik Lissner
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
Henrik Lissner
8b739fb3b0 Set doom-file property less eagerly
Reduces the size of the autoloads file by 6-10% by only setting
doom-file property on raw forms or no-op macros.
2018-06-15 17:35:20 +02:00
Henrik Lissner
da5e2d54ca Refactor autodef generator; put metadata in autodefs
Adds the doom-module and doom-file symbol properties to autodefs,
allowing functions like doom/describe-setting some insight into the
origin of the autodef.
2018-06-15 16:20:20 +02:00
Henrik Lissner
3c7c5d5120 Move doom-file-cookie-p to core-dispatcher
And rename it to doom--file-cookie-p
2018-06-15 16:20:20 +02:00
Henrik Lissner
13426eecde Fix YES/-y support in doom refresh dispatcher 2018-06-15 04:24:48 +02:00
Henrik Lissner
eaca8c58fa Move unit tests from ert to buttercup
Easier to organize and write. Now I can hopefully strive for better
coverage!
2018-06-15 03:42:01 +02:00
Henrik Lissner
04ec62c8f2 General, minor refactor & feedback revision 2018-06-14 19:49:03 +02:00
Henrik Lissner
f44ebbb7ed Refactor autoload generator, plus autodef support
Soon, autodefs will replace settings (i.e. def-setting! & set!). This
refactor prepares for it.
2018-06-14 19:46:31 +02:00
Henrik Lissner
8c4d8d739b Remove (provide ...) forms from package autoloads 2018-06-14 03:36:46 +02:00
Henrik Lissner
6571c9eabf Update :depth in doom-files-in call
Was searching for *.el files one level too deep.
2018-06-14 03:36:46 +02:00
Henrik Lissner
69c6e0b8fb Add doom-get-package-alist
New function returns a list of (NAME . DESC) cons cells in the order
they were declared (in module packages.el files).

Fixes a load-order issue where autoloads from one package would depend
on the autoloads of another package, but was inserted into
doom-package-autoload-file *before* the depended package, causing
void-variable errors.

Also allows for a big refactor of the :plugins byte-compile target.
2018-06-14 03:36:46 +02:00
Henrik Lissner
399591b951 Add :mindepth property to doom-files-in
+ don't error out if directory doesn't exist.
+ :depth now starts from 0, instead of 1
2018-06-12 21:07:34 +02:00
Henrik Lissner
98d2a35a59 Compile plugins in the correct order
Compile order will affect some packages, so `bin/doom compile :plugins`
will now byte-compile plugins in the order they're declared in, but
after their dependencies.
2018-06-12 12:58:47 +02:00
Henrik Lissner
c6324da59d Add force-p parameter to doom//refresh
Also force autoloads regeneration on doom upgrade.
2018-06-12 12:26:58 +02:00
Henrik Lissner
0be2be5c82 Remove autoload/modules library
Move batch commands into core-dispatcher and doom//reload into
autoload/help. It will soon be renamed doom/reload.
2018-06-12 00:02:04 +02:00
Henrik Lissner
400a4dafdb Revert unit test breakage
This hunk was accidentally committed ahead of time!
2018-06-10 17:36:11 +02:00
Henrik Lissner
b079db8ec3 Refactor unneeded arg out of local function _load
In doom-initialize-packages.
2018-06-10 17:28:17 +02:00
Henrik Lissner
e4a55d31bc Don't abort package install on aborting autoremove
Originally, it would not bother running doom//packages-install if you
aborted (answered "n" to the prompt) during doom//packages-autoremove.
2018-06-07 02:51:45 +02:00
Henrik Lissner
f71d4634e8 Remove TODO colorizing in bin/doom help
It's unused and excessive. KISS!
2018-06-05 12:04:43 +02:00
Henrik Lissner
282e0d6653 Move emacs version check into doom-initialize
Also fixes void-function errors caused by (now removed)
doom-same-emacs-version-p not being defined in all the contexts it was
needed.

Where it was before was clumsy design.
2018-06-05 12:04:43 +02:00
Henrik Lissner
ee154a3eb7 Add Emacs version check to noninteractive session
Changing Emacs versions can cause incompatibilities. Doom now warns the
user about these.
2018-06-04 21:17:49 +02:00
Henrik Lissner
37b9beb9c9 Fix doom//upgrade not detecting updates 2018-06-03 15:58:49 +02:00
Henrik Lissner
ae7ead6e87 Refactor doom//upgrade 2018-06-02 13:56:39 +02:00
Henrik Lissner
2b052a9563 Ignore untracked files on make upgrade
In case temporary/cache files are saved outside of .local, for example.
2018-06-01 11:25:47 +02:00
Henrik Lissner
71dc572d79 Run doom//refresh after successfull doom//upgrade 2018-05-30 16:05:24 +02:00
Henrik Lissner
c4bbffd7ee Extract refresh dispatcher into doom//refresh 2018-05-30 16:05:24 +02:00
Henrik Lissner
debe3e0dd3 Remove unnused letvar doom--inhibit-reload 2018-05-29 19:39:22 +02:00
Henrik Lissner
61b22c1c7f doom//upgrade: git reset instead of pull + error handling 2018-05-28 15:49:50 +02:00
Henrik Lissner
b84946318c No means no
Saying no to a confirmation prompt should abort the refresh process.
2018-05-28 12:23:48 +02:00
Henrik Lissner
c8b21e8cf8 Fix doom//upgrade dirty-tree detection
doom//upgrade refused to upgrade Doom because of unexpected behavior
with vc-state, which unhelpfully returns 'unregistered for unmodified
files. Instead, I manually test for output from git status --porcelain.
2018-05-28 12:20:01 +02:00
Henrik Lissner
1a452b6842 💥 Change first arg of load! macro
load!'s first argument is no longer a symbol (that will cause
void-variable errors now) to save on unnecessary interning and simplify
compile-time logic. It accepts any valid form that evaluates to a string
now.

If you use load!, you need to change its argument to a string!

e.g. (load! +my-module) => (load! "+my-module")
2018-05-27 12:52:28 +02:00
Henrik Lissner
b5ec39f0ec Rewrite (and hopefully fix) doom//upgrade again 2018-05-26 23:25:06 +02:00
Henrik Lissner
85c6d06c3f Try to reload doom/package autoloads before before/after doom refresh 2018-05-25 19:25:18 +02:00
Henrik Lissner
ef9b30cdef Fix doom//upgrade failing to detect branch & clean *.elc files before updating 2018-05-25 19:22:44 +02:00
Henrik Lissner
365201bfcf doom//upgrade: fix void-variable core-file error 2018-05-25 19:22:41 +02:00
Henrik Lissner
4aacd831b5 Fix doom//upgrade (make upgrade) 2018-05-25 12:49:39 +02:00
Henrik Lissner
73045f9950 Fix doom//quickstart & improve feedback (make quickstart) 2018-05-25 12:49:39 +02:00
Henrik Lissner
ef9cea4d11 More aggressive autoloads reloading on install, autoremove, update & refresh 2018-05-25 02:20:28 +02:00
Henrik Lissner
3261f1fd71 Finalize core-dispatcher API
+ Add doom-auto-accept to replace YES envvar.
+ Add docstrings & documentation to all commands.
+ Make dispatcher support more than one alias.
+ Document quickstart command
+ Update autoloads/install/autoremove/update/refresh to fit new initialization workflows
+ Rename doom//info and doom//version
+ Recompile alias is now rc instead of cc
+ Improve reliability of doom//quickstart
2018-05-24 21:20:02 +02:00
Henrik Lissner
553d00b598 Add doctor/help dummy dispatchers
This way they show up in doom help + documentation.
2018-05-21 15:42:36 +02:00
Henrik Lissner
89c52e7d99 Rename reload dispatcher to refresh & refactor 2018-05-21 01:38:17 +02:00
Henrik Lissner
f058505306 New bin/doom (eventual replacement for make)
This commit adds bin/doom, which acts as the middle man that make once
was (and will stay for a while, though the documentation will shift away
from using it). It does everything the previous make interface did, but
is faster and more flexible. bin/doom should eventually replace the
makefile.

bin/doom also makes it easier to run Doom outside of ~/.emacs.d and
~/.doom.d with, for example:

  bin/doom run -p ~/.other.doom.d/ -e ~/.other.emacs.d

bin/doom.cmd is included for Windows users, but I don't recommend using
it yet. It hasn't been tested nor have I ever written a batch script
before.

Also update init.example.el with new defaults.
2018-05-21 01:38:17 +02:00