Commit Graph

2399 Commits

Author SHA1 Message Date
a1e49d174a Exclude {packages,doctor}.el from make compile
These two files shouldn't be byte-compiled. Until now it was expected
that you'd include a no-byte-compile: t header in these files. This is
more convenient.
2018-05-16 18:13:07 +02:00
673d3ed147 Prevent duplicate entries in doom-auto-minor-mode-alist 2018-05-16 13:14:46 +02:00
262b2f957b Fix associate! not enabling minor modes for :files/:modes/:when
Fixes #585
2018-05-16 13:14:46 +02:00
377e8a7b3c Refactor doom-initialize; error handling for faulty autoloads 2018-05-16 10:50:01 +02:00
3e6d7f174a Optimize make autoloads & improve path expansion
Make autoloads will expand the include paths of Doom autoload cookies.
This fixes an issue where paths were expanded to include a file
extension, bypassing the benefits of byte-compilation.
2018-05-16 10:50:01 +02:00
b4a7e5348a Autoload smartparens commands
Turns out I *do* need these!
2018-05-16 00:58:04 +02:00
980f5e470b Fix edge case where package autoloads would break startup
Particularly in the case of gh loading eieio and marshal.
2018-05-16 00:57:31 +02:00
e7a1e0b4a2 Improve interactive package management support 2018-05-16 00:11:14 +02:00
595109209a Fix doom//reload & optimize make all task 2018-05-16 00:11:14 +02:00
1e004a5638 Change undo-tree deferral to before switch buffer 2018-05-16 00:11:14 +02:00
9aa346f185 Make packages! accept list of package names (non lists)
This convenience macro lets you specify multiple packages with one
block, e.g.

  (packages! rtags ivy-rtags glsl-mode)

Each entry can be a full recipe.

  (packages! (rtags :disable t) (glsl-mode :recipe (...)))
2018-05-16 00:11:14 +02:00
0dfe1bc3d5 Allow chained package!'s
This allows users to disable one master package, thus disabling all its
children. e.g. Disable irony, then irony-eldoc, flycheck-irony,
company-irony and company-irony-c-headers will be disabled too.
2018-05-16 00:11:14 +02:00
09ecce0073 Fix package! :disable not disabling packages 2018-05-16 00:11:14 +02:00
b6813393d8 Remove custom helpful pretty-printer; default is superior 2018-05-16 00:11:14 +02:00
4734d55edc Revert smartparens deferral until first before-switch-buffer 2018-05-15 22:19:37 +02:00
18e6a6b1db Include package autoloads in doom-autoloads-file
This offloads some of the work Doom has to do creating
`doom-packages-file` onto `make autoloads`. This closely mimics the
package-quickstart-refresh functionality in Emacs 27+, but is more
specialized.

This means package autoloads are now loaded on every startup.

Many :mode, :interpreter, and :commands declarations in def-package!
blocks are made redundant by this and will be cleaned up soon.
2018-05-15 22:17:43 +02:00
8428a7a4ef Autoload smartparens library 2018-05-15 22:07:44 +02:00
7c97fd3c73 Load smartparens a little sooner (fix sp-with-modes error) 2018-05-15 21:52:09 +02:00
12013b4ad4 Cache interpreter-mode-alist in doom-packages-file too 2018-05-15 21:49:51 +02:00
c36e127ec5 Rethink core package deferral hooks
Ensure they are available exactly when they can be useful, but no
sooner.
2018-05-15 21:49:51 +02:00
97b8c04dbb def-package!: specify id for deferred-load transient hooks
Makes them easier to identify in hook lists.
2018-05-15 21:49:51 +02:00
6b8520d189 Change add-transient-hook! to take hook suffix as 2nd arg
By default, transient hooks are defined as doom-transient-hook-N, where
N is a counter. This makes debugging them difficult.

Now, you may specify an id for the second argument. e.g.

  (add-transient-hook! 'find-file-hook load-evil (require 'evil))

Will define doom|transient-hook-load-evil, which is easier to debug and
remove, if necessary.
2018-05-15 21:49:51 +02:00
af079e5f6f Remove unused doom-deferred-packages variable 2018-05-15 21:49:51 +02:00
86b6fab18e Add: ace-link-mu4e autoload 2018-05-15 09:30:21 -04:00
70d0ce4528 Fix error when def-package-hook! was used anywhere 2018-05-15 11:23:44 +02:00
032203ef99 hscroll-margin = 2
So that moving to the ends of a sentence don't sometimes leave the
cursor beyond the edge of the screen in GUI Emacs.
2018-05-15 10:54:45 +02:00
a6c6686628 Enable global-undo-tree-mode after setting variables 2018-05-15 10:54:45 +02:00
94f9e43f25 Rewrite :defer semantics
:defer now supports a hook, a cons cell with (SYMBOL . INTEGER) where
SYMBOL is a hook and INTEGER is a number of idle seconds before the
package is autoloaded, or just the integer (as per the default behavior
of :defer).

Also fixes an issue where switch-buffer-deffered packages (like
smartparens) wouldn't load.
2018-05-15 10:54:45 +02:00
1320d83834 Fix doom/info displaying nil module flags 2018-05-15 03:15:45 +02:00
7bf133e991 Update unit test bootstrap 2018-05-15 01:46:22 +02:00
682587ac26 Remove esup 2018-05-15 01:46:08 +02:00
d51f3b1f38 Map /[A-Z]+$ files to text-mode 2018-05-15 01:40:42 +02:00
d0f8bf402a doom-visible-windows: support visible window-parameter 2018-05-15 01:31:40 +02:00
bdf6fceb52 Silence deleted *.elc messages if byte-compile fails 2018-05-14 21:09:12 +02:00
bb88411cc9 General minor refactor & docstring fixes 2018-05-14 20:55:55 +02:00
67dab98859 Improve idempotency of Doom config (in case of reloading) 2018-05-14 20:54:58 +02:00
87699f3973 Change doom//reload to only reload private config 2018-05-14 20:37:13 +02:00
bec79a3d4c Major refactor of Doom bootstrap process
+ New `input` and `buffer` support for :defer in def-package! can now
  defer packages until the first command invoked after startup or first
  interactive buffer switch, respectively
+ Exploit these new :defer techniques to lazy-load many core packages,
  netting Doom a 20-30% decrease in startup time
+ Various userland macros (like package!, def-package-hook!, packages!,
  and disable-packages!) will now throw an error if used incorrectly
  (i.e. outside of their intended files; e.g. package! should be used in
  packages.el files)
+ Removed support for multiple/nested doom! calls. There should only be
  THE ONE in ~/.doom.d/init.el (or ~/.config/doom/init.el)
+ Fix an issue where load-path and auto-mode-list modifications would
  not persist because doom-packages-file was cached too late.
+ Added package-activated-list to cached variables in
  doom-packages-file, thus we no longer need custom-file.
+ Load Doom core files from doom-initialize. Now doom-initialize can be
  called from state-dependent non-interactive functions, instead of
  reloading core/core.el, which was clumsy
+ Removed the doom-post-init-hook hook. There was no reason for it to
  exist when doom-init-hook can simply be appended to
2018-05-14 20:37:13 +02:00
bb4a8e98e6 load-prefer-newer = noninteractive 2018-05-14 18:34:34 +02:00
e3e0cb7e68 doom/describe-modules: no initial input, instead set default 2018-05-14 18:32:26 +02:00
f2eedb44dc Remove https from package-archives dynamically 2018-05-14 15:57:54 +02:00
a1b385a23d eval-when-compile EMACS2*+ consts 2018-05-14 13:05:33 +02:00
eb5fd0aa53 run-hook-with-args => run-hooks, in custom hooks 2018-05-14 13:05:03 +02:00
4603a4e113 Change doom-theme on load-theme 2018-05-14 13:05:03 +02:00
0bd88b8414 Add restart-emacs package & commands 2018-05-14 13:05:03 +02:00
d1068723e4 Move doom-packages-file to doom-cache-dir 2018-05-14 13:05:03 +02:00
afdc6a31b5 Move def-setting! macros to core-packages 2018-05-14 13:05:03 +02:00
e3841c4460 Add placement checks for package macros
Doom should complain if these macros are found anywhere they're not
supposed to be.
2018-05-14 13:05:03 +02:00
88082c0dc9 Add doom//reload command (experimental) 2018-05-14 13:05:03 +02:00
99bd3beec2 Autoload ace-link-addr 2018-05-14 13:05:03 +02:00