Commit Graph

2781 Commits

Author SHA1 Message Date
c6324da59d Add force-p parameter to doom//refresh
Also force autoloads regeneration on doom upgrade.
2018-06-12 12:26:58 +02:00
77ac164651 Fix core libraries not loading
Caused because the load-path is reset to doom-site-load-path in
doom-initialize-packages, which was initialized before doom-core-dir was
added to it, so core-* libraries couldn't be found.
2018-06-12 12:18:21 +02:00
85591ca296 Move custom-file into local-dir (not etc-dir)
Makes more sense to put more vital files in local than etc or cache.
2018-06-12 12:17:33 +02:00
9ec0461162 Revert "Refactor def-package!"
This reverts commit f7a86ae281.

Turns out it's still needed when byte-compiling!
2018-06-12 01:58:06 +02:00
4425fdfca4 defvar -> defconst for dir vars 2018-06-12 01:48:09 +02:00
4c40195d40 Slightly better version check error 2018-06-12 01:47:43 +02:00
64e02e4232 Load core-packages in doom//run-tests 2018-06-12 01:45:52 +02:00
f7a86ae281 Refactor def-package!
It is no longer necessary to gate use-package calls with
:if/:when/:unless checks during byte-compilation. This was fixed
somewhere along the way.
2018-06-12 00:26:28 +02:00
fe6afa19a3 Add docstrings to FILE! & DIR! macros 2018-06-12 00:25:11 +02:00
1c3183b298 Remove space in backend labels during install
Minor reformatting. To be consistent with the backend transition labels
in doom//packages-autoremove.
2018-06-12 00:02:04 +02:00
72201fead5 Major refactor of package management API
Fixes issues where:

+ package!'s :disable property was ignored and def-package! wouldn't
  ignore disabled packages.
+ Certain quelpa packages were being removed/reinstalled infinitely
+ Improved flexibility of doom-get-packages (its docstring needs to be
  updated!)
2018-06-12 00:02:04 +02:00
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
0741c8851a Split core-packages into two (packages & modules)
+ Move doom-initialize et co into core.el
+ Lazy load core-packages
+ load! has been moved into core-lib
+ Added FILE! and DIR! macros
+ Fix package! not returning correct value when package is disabled
+ Remove :disabled support for def-package-hook! officially
2018-06-12 00:02:04 +02:00
a25eff0189 delete-this-file: don't propagate deletion to vcs
Doom shouldn't assume the user always wants to stage the current
deletion after every delete.
2018-06-11 01:33:56 +02:00
dd9f8d47af Fix infinite recursion in buffer switch hooks
Caused by advice functions trying to manipulate non-existent buffers
that were intended to be created after switching to them.
2018-06-11 00:39:55 +02:00
6bf529ddf8 Add magit/vcs support to doom file commands 2018-06-10 23:23:09 +02:00
6f98aeebfb Don't set doom-init-modules-p from doom-modules
Causes user config to not be loaded if doom-modules is used earlier.
2018-06-10 20:58:00 +02:00
f02156286b Error if autoloads are missing interactively
Trying to regenerate them greatly complicates doom-initialize's
potential use-cases. Keep it simple stupid!
2018-06-10 20:57:14 +02:00
19deb4b926 Fix buffer-read-only: autoloads.el error 2018-06-10 20:55:42 +02:00
5295f36115 case-fold-search = nil in reload-package-autoloads
Slight optimization.
2018-06-10 20:54:32 +02:00
2d5ac8a164 Fix void-variable package--builtins error
Occurs while running make install because package.el wasn't loaded in
time.
2018-06-10 19:15:39 +02:00
85704bea33 Fix void-variable ex2 error while package managing 2018-06-10 19:10:58 +02:00
f144691157 Don't delete autoloads file
Turns out to be more error prone. Better to just ignore the existing one
when force-initializing Doom.
2018-06-10 19:07:37 +02:00
8d4971d02b Remove vestigial reference to doom-module-table 2018-06-10 17:48:48 +02:00
400a4dafdb Revert unit test breakage
This hunk was accidentally committed ahead of time!
2018-06-10 17:36:11 +02:00
9cc190adc9 Minor reformat & refactor keyword intern 2018-06-10 17:28:17 +02:00
2605a3938e Initialize modules conditionally
doom-modules will be initialized on demand in non-interactive sessions.
2018-06-10 17:28:17 +02:00
a87641635f load-prefer-newer = nil for private config
load-prefer-newer = t makes debugging harder and reduces the
predictability of your config.
2018-06-10 17:28:17 +02:00
3498d5c6b1 Catch more *.elc files with bin/doom clean 2018-06-10 17:28:17 +02:00
b079db8ec3 Refactor unneeded arg out of local function _load
In doom-initialize-packages.
2018-06-10 17:28:17 +02:00
7e00a83acc Update & refactor doom-info 2018-06-10 17:28:17 +02:00
edb6fd1964 Change how private & disabled packages are marked
They are now included in doom-packages, but with :private t or :disabled
t properties. This allows us to search for them if we wish (e.g. for
doom info).
2018-06-10 17:28:17 +02:00
88f1ae3797 Refactor autoloads init in doom-initialize
Simplify doom-initialize-autoloads
2018-06-10 17:28:17 +02:00
ee154911ae Redesign doom-get-package
Now more useful for filtering packages by certain properties.
2018-06-10 17:28:17 +02:00
01d1a814f9 Refactor doom-initialize functions
Removes doom-module-table; which was inflexible (though more stable). It
prevented you from putting your doom! block in anywhere but
~/.doom.d/init.el.

It is replaced (somewhat) by (doom-modules).
2018-06-10 17:30:26 +02:00
1e2fc4227a Fix void-variable: package--initialized error 2018-06-10 17:28:17 +02:00
d4869228f5 Inhibit recursive switch-hooks in sub-hooks too 2018-06-10 17:28:17 +02:00
14890376b1 Propagate buffer errors up the call stack
Delegates set-buffer(nil) errors (when switch hooks are called with an
invalid or dead buffer) to the caller to handle.

Fixes #668, #674
2018-06-10 17:28:17 +02:00
dd2d704137 Fix reference to renamed _directory variable
Whoops!
2018-06-08 13:39:04 +02:00
81c465a545 Move OS constants to core/core.el
So it is universally available to all of Doom, rather than excluding
sessions that haven't called doom-initialize interactively.
2018-06-08 13:31:45 +02:00
bc2f8a0ec9 Don't complain about used _directory letvar
Byte-compiler-sama must be appeased.
2018-06-08 13:30:20 +02:00
99d6927e56 Improve error-handling for quelpa packages 2018-06-08 13:08:38 +02:00
ab98020295 Optimize buffer normalization in switch hooks
get-buffer is faster than window-normalize-buffer-to-switch-to.
2018-06-08 13:08:37 +02:00
99afb01315 equals -> file-equal-p refactor
Use more reliable file comparison function.
2018-06-08 13:08:37 +02:00
ee262e7737 Refactor error handling in package management API
I am hoping this will improve the ambiguous errors that originate from
package.el or quelpa.el.
2018-06-08 13:08:34 +02:00
b207c4040b Minor, general refactor 2018-06-07 02:51:46 +02:00
ef9d8fb2e8 Don't trigger whitespace-mode if already on
Normally doom|show-whitespace-maybe turns on whitespace-mode with a
subset of its features when indent-tabs-mode was different in that
buffer versus it's global default. e.g. If your default was spaces and
you opened a file with tabs.

This is to make it easier to notice whitespace style discrepancies.

However, it have side effects if whitespace-mode/global-whitespace-mode
was already on.
2018-06-07 02:51:45 +02:00
dda81f7b54 Fix insertion order of add-hook! when appending
When appending multiple functions to a hook(s) with add-hook!, insertion
order was not preserved. e.g.

  => (add-hook! :append 'some-mode-hook #'(hook-1 hook-2))
  => some-mode-hook
  (hook-2 hook-1)
2018-06-07 02:51:45 +02:00
fcb5284393 Update switch-buffer hooks' docstrings 2018-06-07 02:51:45 +02:00
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