Commit Graph

195 Commits

Author SHA1 Message Date
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
2516a123d6 Use -- to delimit arguments 2017-11-07 13:08:19 +01:00
95a5b46dc5 New // naming convention + refactor doom management functions 2017-11-05 19:54:43 +01:00
2009a841fd doom-initialize: retry package-initialize on error 2017-11-05 01:16:36 +01:00
40a1aaae8e Make async a core package 2017-11-05 01:16:35 +01:00
cd7ab060e0 General refactor & docstring updates 2017-10-05 17:02:59 +02:00
3062687998 Revert "Preload modules before compiling #219"
This reverts commit c9632a7d8b.

Causes more general breakage.
2017-10-05 14:17:05 +02:00
c9632a7d8b Preload modules before compiling #219 2017-10-05 12:38:23 +02:00
e2adda7466 More init logging; more details in startup message 2017-10-02 20:03:49 +02:00
42fec8494d Rename doom/reload => doom/reload-load-path 2017-09-19 15:07:57 +02:00
42e7f56a1f Refactor doom--module out of featurep! workflow
Fixes a 'featurep! not used properly' error that occurs during byte
compilation.
2017-09-15 14:37:19 +02:00
a2367866ec Load files during byte-compilation
Prevents issues like missing macro definitions in later modules, at the
cost of making byte-compilation a little heavier.
2017-09-15 13:44:37 +02:00
bb959c635b Prevent/delay hash-table rehashing
This is *definitely* premature optimization.
2017-09-11 23:15:20 +02:00
4addd92c30 Simplify core loading process (part 3) 2017-08-08 19:14:10 +02:00
c021d347d3 Refactor module pairs and paths helpers 2017-08-08 16:38:17 +02:00
87ee1a06e3 Remove def-feature! (keep things simple!)
Removed syntactic sugar macro because it just hides obvious
functionality behind magic.
2017-08-08 16:38:17 +02:00
ac05f9a763 Remove wildcard support from doom! macro
"Explicit is better than implicit."
2017-08-08 16:38:17 +02:00
0b7b8800a2 Add support for module flags in doom! macro #158
For example:

  (doom! :feature (version-control +git))

I leave it to modules to interpret these flags, and they can be detected
through one of the following:

 + (featurep! :feature version-control +git)
 + (featurep! +git) -- syntactic sugar, only available from within
   modules.
 + (doom-module-flags :feature version-control) -- returns a list of
   flags for this module.

Flags are also available from packages.el files.
2017-08-08 16:38:17 +02:00
65748c5809 Simplify core loading process 2017-08-08 14:25:36 +02:00
5346670ab0 Add doom/recompile-packages (make compile:elpa)
If you upgrade (or downgrade) Emacs, there may be byte-compilation
errors. This works around that.
2017-07-28 19:21:00 +02:00
aa255d9cb6 Revert "Refactor doom-initialize-packages"
This reverts commit ea4d0a50cb.

Fixes #148
2017-07-26 17:07:10 +02:00
f0fc5c5281 doom/compile: don't count excluded test files 2017-07-14 19:49:54 +02:00
6a5bd216e5 Appease byte-compiler senpai 2017-07-14 18:19:08 +02:00
ac514d7a0c [Hotfix] Fix doom-initialize-packages #147
Caused by incomplete initialization of Doom core when
doom-initialize-packages is used from noninteractive commands.
2017-07-14 18:14:23 +02:00
c50dc63854 General cleanup 2017-07-14 15:23:12 +02:00
ea4d0a50cb Refactor doom-initialize-packages
It reloaded Doom too aggressively. No more.
2017-07-13 00:05:30 +02:00
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
1ff0c2a8e7 doom/clean-compiled => doom/clean-compiled-files 2017-07-09 22:52:28 +02:00
27b344b64a Rename doom/clean-cache => doom/reset (+ make reset) 2017-07-09 22:51:36 +02:00
a002f7025c Rewrite docstrings for package functions/macros 2017-07-02 16:47:27 +02:00
ce5cd52642 Refactor load! to accept a string filesym 2017-07-02 16:38:28 +02:00
cbfb3eeda4 Fix, rename & move doom/run-tests => doom-run-tests 2017-06-24 17:15:22 +02:00
fac587d21e Remove debug code in doom-initialize-modules 2017-06-24 16:51:37 +02:00
e38337b357 Evaluate featurep! at compile-time
Its return value shouldn't change during runtime.
2017-06-24 02:25:15 +02:00
a5e2a5745b Eval :ignore/:freeze in package! plists 2017-06-22 23:59:34 +02:00
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
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
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
816df321a5 General refactor & cleanup 2017-06-14 21:15:19 +02:00
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
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
042da73d5d Initialize doom-init-time a little sooner (#106) 2017-06-12 15:13:30 +02:00
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
2097498f3e General docstring+idempotency refactor 2017-06-11 00:59:02 +02:00
688aef12d4 Fix #88: ignored private packages.el 2017-06-10 18:21:59 +02:00
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
aa6ecaa68e Revert async package refresh (#95, #96) 2017-06-08 01:00:44 +02:00
a2f14183a1 Fix double package-refresh on first install 2017-06-06 12:01:10 +02:00