Commit graph

516 commits

Author SHA1 Message Date
Henrik Lissner
1ff0c2a8e7
doom/clean-compiled => doom/clean-compiled-files 2017-07-09 22:52:28 +02:00
Henrik Lissner
27b344b64a
Rename doom/clean-cache => doom/reset (+ make reset) 2017-07-09 22:51:36 +02:00
Henrik Lissner
a002f7025c
Rewrite docstrings for package functions/macros 2017-07-02 16:47:27 +02:00
Henrik Lissner
ce5cd52642
Refactor load! to accept a string filesym 2017-07-02 16:38:28 +02:00
Henrik Lissner
cbfb3eeda4
Fix, rename & move doom/run-tests => doom-run-tests 2017-06-24 17:15:22 +02:00
Henrik Lissner
fac587d21e
Remove debug code in doom-initialize-modules 2017-06-24 16:51:37 +02:00
Henrik Lissner
e38337b357 Evaluate featurep! at compile-time
Its return value shouldn't change during runtime.
2017-06-24 02:25:15 +02:00
Henrik Lissner
a5e2a5745b
Eval :ignore/:freeze in package! plists 2017-06-22 23:59:34 +02:00
Henrik Lissner
e44f5d0457
Call doom|finalize after doom-initialize-packages
doom-initialize-packages re-initializes certain important variables,
like gc-cons-threshold (which causes intermittent freezing when set too
high), without resetting them to sensible defaults. This ensures those
variable are reset afterwards.
2017-06-20 16:25:46 +02:00
Henrik Lissner
345b704a0d
Make interactive doom/compile less destructive
It would reload all files; which is harmless, but does unnecessarily
inflate variables that get push-ed or nconc-ed to. It's best to compile
from the command line.
2017-06-20 16:25:46 +02:00
Henrik Lissner
9039707184
Fix error when private init.el doesn't exist
Found in doom-initialize-packages, which DOOM calls in many
noninteractive functions.
2017-06-14 21:42:08 +02:00
Henrik Lissner
816df321a5
General refactor & cleanup 2017-06-14 21:15:19 +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
732dee608a
Stability/error-handling refactor (part 1)
This refactor is about improving how Emacs deals with errors.

A large net is now cast at startup to catch possible errors, produce
more helpful error messages, and localize the damage. Significantly
reducing the risk of later modules not loading (and leaving you
stranded in a half-broken Emacs session).

The DOOM core files are an exception. If something messes up in there,
it *should* choke.

+ use-package will now report missing packages or slow-loading/broken
  def-package! configurations.
+ Persp-mode no longer (inadvertantly) hides buffers that pop up at
  startup, like the *Warnings*, *Backtrace* or debugger buffers.
+ `make autoloads` (or doom/reload-autoloads) now produces a slightly
  more informative error message if an error occurs while building the
  autoloads file.
+ Error handling for package management is *slightly* better now; error
  messages now include the type of error; this needs work.
2017-06-14 21:15:19 +02:00
Henrik Lissner
042da73d5d
Initialize doom-init-time a little sooner (#106) 2017-06-12 15:13:30 +02:00
Henrik Lissner
4984a548d1
Refactor DOOM init & add new init hooks
+ Add doom-init-hook and doom-post-init-hook to simplify Emacs init
  hooks into less ambiguous ones.
+ Attach former after-init-hook and emacs-startup-hook hooks to new doom
  init hooks.
+ Vastly improves daemon and tty support: preventing incorrect colors
  from bleeding across face class barriers, and into GUI Emacs and vice
  versa, when spawned with emacsclient.
+ Fix persp-mode breaking Emacs daemon, and ensuring that initialization
  is done properly in terminal Emacs (and emacsclient frames).
2017-06-12 00:37:14 +02:00
Henrik Lissner
2097498f3e
General docstring+idempotency refactor 2017-06-11 00:59:02 +02:00
Henrik Lissner
688aef12d4
Fix #88: ignored private packages.el 2017-06-10 18:21:59 +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
aa6ecaa68e
Revert async package refresh (#95, #96) 2017-06-08 01:00:44 +02:00
Henrik Lissner
a2f14183a1
Fix double package-refresh on first install 2017-06-06 12:01:10 +02:00
Henrik Lissner
7005ae13d7
Load private init.el before compilation (fix #95)
Ensures that private settings are available during byte-compilation.

Also fixes a compile error when private init.el (which should be an
optional file) doesn't exist.
2017-06-06 11:45:19 +02:00
Henrik Lissner
fe610c0973
Fix private init.el when byte-compiled
By byte-compiling it earlier in doom/compile
2017-06-05 23:02:07 +02:00
Henrik Lissner
df92e47967
Refactor subr-x out of doom/compile 2017-06-05 20:19:46 +02:00
Henrik Lissner
341219f1bf
Refactor doom! (simplify) 2017-06-05 20:19:23 +02:00
Henrik Lissner
d4761a7c6d
Add :disable support to def-package-hook!
`def-package!` now respects `doom-disabled-packages`
2017-06-05 16:45:42 +02:00
Henrik Lissner
d62f446dc3
General cleanup + refactor; revise docstrings 2017-06-05 16:45:19 +02:00
Henrik Lissner
0d9c0e7f54 Add def-package-hook! macro 2017-06-05 14:23:17 +02:00
Henrik Lissner
27bfa14def General refactor + cleanup 2017-06-05 14:23:17 +02:00
Henrik Lissner
435fda0f41
Add :ignore & :freeze support to package! 2017-06-05 14:21:07 +02:00
Henrik Lissner
b82ace43ea Autoload private module & add private init.el (#88) 2017-06-05 12:35:51 +02:00
Henrik Lissner
30402495fe General refactor + cleanup 2017-06-05 12:35:51 +02:00
Henrik Lissner
77e2a1f6f2 Refactor doom/reload 2017-06-03 21:00:53 +02:00
Henrik Lissner
d5682953a9 Be extra sure to delete the right *.elc files
Ensures no extra elc files are caught in the crossfire, e.g. in .cask or
elsewhere.
2017-06-03 12:05:43 +02:00
Henrik Lissner
8af009f9b7 Ignore autoload/evil*.el if evil isn't loaded 2017-05-28 02:48:20 +02:00
Henrik Lissner
157eb3e5da Revise tls-program; rely on default trust stores
Addresses #72 & #80
2017-05-26 20:22:45 +02:00
Henrik Lissner
d5d0f26c09 Add :gblame & :grevert ex commands 2017-05-21 15:10:49 +02:00
Henrik Lissner
ddb2c2cd4d quelpa-verbose = doom-debug-mode 2017-05-21 15:10:33 +02:00
Henrik Lissner
5b343a32d0 Don't change gc-cons-threshold on reload 2017-05-21 10:34:21 +02:00
Henrik Lissner
a4bacca812 Update TLS settings (#72) 2017-05-20 18:40:13 +02:00
Henrik Lissner
00b4ab1776 Fix .travis.yml + add INSECURE envvar 2017-05-19 23:49:07 +02:00
Henrik Lissner
7e702bd9d3 Use default gnutls-trustfiles for other OSes 2017-05-19 22:34:08 +02:00
Henrik Lissner
5e894027c5 Improve error handling for package management 2017-05-19 22:30:44 +02:00
Henrik Lissner
e678d13ed6 Use HTTPS ELPA sources & verify TLS (#72) 2017-05-19 22:30:34 +02:00
Henrik Lissner
323b2f6c2f Refactor package management: better feedback & bug fixes 2017-05-19 02:57:39 +02:00
Henrik Lissner
c98efbe28e doom/reload-autoloads: more feedback when debug mode is on 2017-05-15 20:26:33 +02:00
Henrik Lissner
e265431507 General refactor, cleanup & commenting 2017-05-10 05:28:50 +02:00
Henrik Lissner
c52efdfb5b Load ~/.emacs.local.el, if available 2017-05-01 14:52:39 -04:00
Henrik Lissner
d651311d1d Various tweaks & clean up 2017-05-01 14:52:29 -04:00
Henrik Lissner
d20c8045ab General cleanup 2017-04-25 23:01:45 -04:00