Commit Graph

39 Commits

Author SHA1 Message Date
Henrik Lissner
8d4971d02b
Remove vestigial reference to doom-module-table 2018-06-10 17:48:48 +02:00
Henrik Lissner
b70ed84a33
Fix doom//run-tests 2018-05-24 21:20:02 +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
Henrik Lissner
7bf133e991
Update unit test bootstrap 2018-05-15 01:46:22 +02:00
Henrik Lissner
e6dd7fa867
Fix should-buffer! macro for tests 2018-05-08 15:20:06 +02:00
Henrik Lissner
1f9576a59a
Conform unit test macros to naming convention 2018-03-27 02:52:30 -04:00
Henrik Lissner
57efa1b864
Update & fix unit tests 2018-03-02 20:46:45 -05:00
Henrik Lissner
0425724571
Major rewrite of doom module API
+ Fix #446, where the .local/packages.el cache was generated with
  a faulty load-path.
+ Entries in the doom-modules hash table are now plists, containing
  :flags and :path, at least.
+ Add doom-initialize-modules for loading module config.el files.
+ Add doom-module-get for accessing this plist, e.g.

    (doom-module-get :some module)         ; returns plist
    (doom-module-get :some module :flags)  ; return specific property

+ Replace doom-module-enable with doom-module-set, e.g.

    (doom-module-set :some module :flags '(+a +b +c))

+ Remove doom-module-flags (use doom-module-get instead)
+ Rename doom-module-enabled-p with doom-module-p
+ Replace doom-module-path with doom-module-find-path and
  doom-module-expand-file. The former will search for an existing module
  or file in doom-modules-dirs. The latter will expand the path from
  whatever path is stored in doom-modules.
+ Replace doom-module-paths with doom-module-load-path
+ Changed doom! to allow for nested doom! calls by delaying the loading
  of module config.el files until as late as possible.
+ Refactor doom-initialize-packages to only ihitialize package state
  (i.e. doom-packages, package-alist, and quelpa-cache), rather than its
  previous behavior of loading all Doom files (and sometimes all module
  files). This is faster and more predictable.
2018-03-02 19:14:45 -05:00
Henrik Lissner
cf4420e903
Fix doom//run-tests 2018-02-17 22:18:04 -05:00
Henrik Lissner
2b1c323dbf
💥 Redesign private sub-module system
~/.doom.d/modules is now a full module tree, like ~/.emacs.d/modules.
Symlinks are no longer involved.

Private modules can now shadow Doom modules. e.g.
~/.doom.d/modules/lang/org will take precendence over
~/.emacs.d/modules/lang/org.

Also, made doom--*-load-path variables public (e.g. doom--site-load-path
=> doom-site-load-path), and rearranged the load-path for a 10-15%
startup boost.
2018-02-16 02:11:10 -05:00
Henrik Lissner
dfefbd0176
Fix make test not resetting doom-modules properly 2018-02-14 21:18:56 -05:00
Henrik Lissner
4262b9912c Revert "Move init.test.el into core/autoload/test.el"
This reverts commit 3bfb7fa17d.
2018-02-03 22:46:18 -05:00
Henrik Lissner
3bfb7fa17d
Move init.test.el into core/autoload/test.el 2018-02-03 03:30:49 -05:00
Henrik Lissner
e0f6fde7c1
Update doom//run-tests for new doom! 2018-01-29 18:41:55 -05:00
Henrik Lissner
4d51a1ab09
Fix :skip property in def-test! 2018-01-04 16:14:50 -05:00
Henrik Lissner
b7d21fb256
Add let-advice!! test macro 2018-01-04 16:14:50 -05:00
Henrik Lissner
c9a878a62f
Conform unit test macros to naming scheme 2018-01-01 16:59:30 -05:00
Henrik Lissner
8ad2666f8f
Refactor and fix unit tests, plus isolate them better 2017-12-31 14:58:45 -05:00
Henrik Lissner
02c1a78330
Add :skip support for def-test! 2017-12-29 04:17:19 -05:00
Henrik Lissner
fe3db542ed
Fix ERT not running properly on make test 2017-12-10 15:37:32 -05:00
Henrik Lissner
013f8e08d5
Fix make test-* tasks for running specific tests 2017-12-09 14:37:43 -05:00
Henrik Lissner
5ea37bc1ef
Clean up legacy comments 2017-11-08 22:52:55 +01:00
Henrik Lissner
211977e28a
doom--module-pairs => doom-module-pairs 2017-11-08 22:51:55 +01:00
Henrik Lissner
c45e2c4918
General & minor refactor+cleanup 2017-11-05 19:54:44 +01:00
Henrik Lissner
95a5b46dc5
New // naming convention + refactor doom management functions 2017-11-05 19:54:43 +01:00
Henrik Lissner
8800108eed
Add test helper macros to test.el lib 2017-10-05 01:27:46 +02:00
Henrik Lissner
5e393b3233
Ensure module state is initialized on make test 2017-08-09 15:30:42 +02:00
Henrik Lissner
6e8726a624
Simplify core loading process (part 2) 2017-08-08 16:31:48 +02:00
Henrik Lissner
65748c5809
Simplify core loading process 2017-08-08 14:25:36 +02:00
Henrik Lissner
a63640b120
Force interactive when running tests 2017-07-29 00:30:42 +02:00
Henrik Lissner
f93fb61f33
Refactor core.el
+ Load Doom core in doom! macro
+ Move automatic minor modes to core-editor
+ Move doom*set-indirect-buffer-filename to core-editor
2017-07-13 00:05:30 +02:00
Henrik Lissner
e87d278811
Remove (interactive) from non-interactive funcs 2017-07-12 14:59:00 +02:00
Henrik Lissner
f246d89fb6
Fix make test:X/Y where Y is omitted
This way, make feature will run all unit tests in feature/* modules.
2017-06-28 15:28:51 +02:00
Henrik Lissner
869bc03ca6
Load bare minimum for tests 2017-06-28 15:28:13 +02:00
Henrik Lissner
cbfb3eeda4
Fix, rename & move doom/run-tests => doom-run-tests 2017-06-24 17:15:22 +02:00
Henrik Lissner
9c93c453e8
Reorganize unit-tests and test workflow
+ Moved unit tests out of tests/ and into their respective modules.
+ Rewrite makefile and added these tasks:
  + <MODULE>/<SUBMODULE> -- byte-compile a specific module
  + test:<MODULE>/<SUBMODULE> -- runs tests for a specific module
  + testi -- run tests in an interactive session of Emacs (WIP)
  + run -- opens an Emacs session with this config; useful when it is in
    a non-standard location.
2017-06-14 21:15:19 +02:00
Henrik Lissner
c7254e7bdc
Major optimization refactor, across the board
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster
  startup; ~5-20% general boost
+ reduce consing, function calls & garbage collection by preferring
  cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and
  various cl-lib filter/map/reduce functions) -- where possible
+ prefer functions with dedicated opcodes, like assq (see byte-defop's
  in bytecomp.el for more)
+ prefer pcase & cond (faster) over cl-case
+ general refactor for code readability
+ ensure naming & style conventions are adhered to
+ appease byte-compiler by marking unused variables with underscore
+ defer minor mode activation to after-init, emacs-startup or
  window-setup hooks; a customization opportunity for users + ensures
  custom functionality won't interfere with startup.
2017-06-09 00:47:45 +02:00
Henrik Lissner
c370e1cddd Add :disabled property to def-test-group! 2017-04-12 10:52:42 -04:00
Henrik Lissner
acb7536e64 Add core-lib & core-lib-{buffers,package} unit tests + tasks 2017-04-04 22:18:52 -04:00