Commit Graph

450 Commits

Author SHA1 Message Date
4bafe29722 Fix package! :disable not disabling packages
doom-disabled-packages we built either too early or too late, causing
disabled packages to be loaded anyway.
2018-03-28 02:56:24 -04:00
26514e2834 Optimize doom-initialize-packages for cold startup 2018-03-28 00:52:45 -04:00
67e0575d3d Move doom-modules-dirs to core-packages.el 2018-03-27 19:11:11 -04:00
b685baeb64 Fix the package! macro's :disable property 2018-03-27 02:49:19 -04:00
fea7c0a661 Minor revision of package!'s docstring 2018-03-26 18:15:03 -04:00
fa69e25f87 Fix a pre-init race condition caused by doom-initialize-packages 2018-03-26 16:52:53 -04:00
adf724a6e4 Refactor package!'s docstring & add :ignore to it 2018-03-26 16:44:32 -04:00
dd24578657 Restore :ignore property in package! macro 2018-03-26 16:32:05 -04:00
1282072db3 Correct doom-initialize's docstring 2018-03-26 03:18:28 -04:00
adfd26bbf4 Fix error when doom-packages-file doesn't exist 2018-03-26 03:11:29 -04:00
72eb1422c5 Ensure doom-packages is initialized in doom-initialize 2018-03-26 03:07:28 -04:00
03ed4c39e8 Add package! & disable-packages! convenience macros 2018-03-26 02:59:08 -04:00
f67b4ec743 Add docstring for doom-module-put 2018-03-26 02:58:11 -04:00
21a23228f2 Refactor initialization; allow package! to universally disable packages
No need for def-package-hook! for disable packages anymore, you can do
it from package! in packages.el files.
2018-03-26 02:57:37 -04:00
b5db4f1fb6 Debug log missing modules; remove log! macro 2018-03-24 07:25:00 -04:00
3001e59ecc Don't destroy load-path on reload 2018-03-22 06:28:33 -04:00
dec3ecba6e package--initialized = nil in doom-initialize; in case of reloads 2018-03-20 21:12:49 -04:00
c760b33212 Fix recursive load errors when an enabled module doesn't exist 2018-03-14 21:21:58 -04:00
c54fb7b8c0 Fix package advice interfering with doom-initialize
...by aggressively reloading the config from within doom-initialize (too
early, some state hasn't been initialized at this point).
2018-03-14 20:12:15 -04:00
8898c5cb9a Fix void-function doom*initialize-packages error
Occurs before autoloads are generated.
2018-03-14 19:52:25 -04:00
aec4fbe590 Always apply ansi color codes to compilation buffers 2018-03-14 18:28:25 -04:00
cdbd677423 Allow use of package.el #444
This makes package.el commands safe to use in Doom, and prevents errors
caused by unitialized state, by running package-initialize before
you use a package.el command.
2018-03-14 18:25:25 -04:00
5c36519dab Ignore package! if package is disabled
This allows you to disable packages with (def-package-hook! X :disable)
without an accompanying (package! X :ignore t). This reduces redundancy.
2018-03-12 13:32:01 -04:00
a8906cc077 Add note to def-package-hook! to use it only in init.el files 2018-03-12 13:32:01 -04:00
23fda88b2f Detach doom-modules-dirs from doom! macro
Formerly, you were required to have a doom! call (even a blank one) in
~/.doom.d/init.el if you wanted to have private sub-modules in
~/.doom.d/modules/.

No more. It is no longer doom!'s responsibility to affect
`doom-modules-dirs`. This is now done by :config private, while the
Doom modules directory is now the initial entry in doom-modules-dirs.
2018-03-12 13:32:00 -04:00
c6931db3f8 Fix module count in benchmark 2018-03-12 13:32:00 -04:00
724773cbe4 Up the doom-modules :size to 100 2018-03-12 13:32:00 -04:00
4b82c7b7db Ensure doom is reinitialized properly after package management 2018-03-02 21:59:10 -05:00
a22d5f0bb4 Fix error when package cache doesn't exist on reload-load-path 2018-03-02 20:52:30 -05:00
d5c799a536 Rewrite require! macro 2018-03-02 20:45:43 -05:00
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
cde3a3ee78 Delete doom-packages-file on doom//reload-load-path
Fixes potentially malformed load-path after package management
operatins.
2018-03-01 04:47:14 -05:00
70159d829f Fix doom! not loading modules properly 2018-03-01 03:34:38 -05:00
0b2548f7b1 Fix module load order (delay config.el load) #441 2018-02-28 17:57:30 -05:00
56c7d7fdcf doom//byte-recompile-plugins: use non-interactive session
May indirectly solve #428
2018-02-28 17:57:30 -05:00
c2fd538261 Refactor doom startup benchmark 2018-02-28 17:57:29 -05:00
047ed6c9ea Rethink doom-initialize & use package-initalize
Doom saves a lot of startup time by avoiding package-initialize, because
it loads every packages' autoloads file, which is expensive.
Unfortunately, these autoloads files are necessary for some plugins with
abnormal file structures (such as ESS). Previously, I was content with
loading them myself, but these occurrences have become more frequent, so
it would be safest if I relied on package-initialize more.

So doom-initialize will now do so. However, it will cache the load-path
(and Info-directory-list, fixing the lost info buffers) on first run.
This makes byte-compiling Doom almost useless, but it makes startup just
as fast as Doom would be if you had.

This needs more testing.
2018-02-28 17:57:29 -05:00
b1bf67f630 Refactor package init process
quelpa is now initialized by doom-initialize-packages.
2018-02-20 17:54:10 -05:00
6f1b96bc9a Fix void-function error in doom//reload-autoloads
Don't use a third party library in a function that could potentially run
before packages are installed, ya big silly!
2018-02-19 01:31:31 -05:00
a967aa051a Force autoloads to use absolute paths
Autoload paths used to be relative to arbitrary roots (usually
doom-modules-dir). This commit changes doom//reload-autoloads to iterate
over autoloads in doom-autoloads-file and replace their file paths with
an absolute one.

Theoretically this should make Emacs feel marginally faster, but we
*probably* get more of a benefit from a shorter load-path (because we no
longer need doom-modules-dirs, doom-core-dir or doom-psuedo-module-paths
in the load-path).

This is highly experimental however!
2018-02-19 01:25:37 -05:00
1a20c49ef3 Refactor cl-loop => cl-member in doom//byte-compile 2018-02-19 01:20:53 -05:00
7ac29bbd27 Refactor require! macro 2018-02-17 19:09:15 -05:00
8efd5d1eae Fix make clean not catching all *.elc files 2018-02-16 23:28:18 -05:00
d91481a9a0 Add private module to load-path
This fixes autoload cookies in private autoload files (e.g.
~/.doom.d/autoload/file.el).
2018-02-16 23:26:44 -05:00
e7c9f5c08f Fix over-zealous path resolution
This issue made it impossible enable default modules from private doom!
blocks.
2018-02-16 05:33:27 -05:00
bae226b94f Refactor to revolve module tree roots around doom! calls
Any module can now use a doom! call to declare a module tree root.

This means that if you have a doom! block in
~/.emacs.d/modules/lang/org/init.el, then you can have submodules in
~/.emacs.d/modules/lang/org/modules/MODULE/SUBMODULE if you wanted to
for some reason.

This is only really truly useful for private modules. A doom! block in
~/.doom.d/init.el will recognize and enable modules in
~/.doom.d/modules/.
2018-02-16 05:07:46 -05:00
d04a1fa940 Remove doom-module-pairs 2018-02-16 04:47:02 -05:00
f864931643 Fix gibberish (char codes) in load-path 2018-02-16 03:11:28 -05:00
d2436650a3 Move server+benchmark code into doom|finalize 2018-02-16 02:11:41 -05:00
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