spacemacs/layers
syl20bnr 1c4f685b13 core: refactor layer system
TL;DR Should get 20~25% speed improvement on startup, should get a big
improvement when using ivy or helm SPC h SPC. Users with layers.el files
in their layers must use `configuration-layer/declare-used-layer`
instead of `configuration-layer/declare-layer`

The implementation of the layer system made heavy use of `object-assoc`
and `object-assoc-list` functions which are not efficient. This PR
mainly replaces those object lists with hash maps in order to index the
objects by their name and achieve an O(1) access time.

The old object lists `configuration-layer--layers` and
`configuration-layer--packages` have been each by two variables each:
- `configuration-layer--indexed-layers` which is a hash-map of all the
layer objects and `configuration-layer--used-layers` which is a list of
all _used_ layers symbols,
- symmetrically `configuration-layer--indexed-packages` which is a
hash-map of all the package objects and
`configuration-layer--used-packages` which is a list of all _used_
packages symbols.

The hash map `configuration-layer--layer-paths` is gone, now we create
directly layer objects when discovering the layers and set the :dir
property. Note that previously the layer paths were the parent directory
of the layer, now :dir is the layer path.

The function `configuration-layer//make-layer` is now similar to its
counterpart `configuration-layer//make-package` in the sense that it
takes an optional `obj` to be able to override its properties.

The functions `configuration-layer/declare-layer` and
`configuration-layer/declare-layers` now takes an optional parameter
`usedp` in order to declare used or not used layers. For convenience
new functions have been added: `configuration-layer/declare-used-layer`
and `configuration-layer/declare-used-layers`, users _must_ update all
occurrences of `configuration-layer/declare-layer` by
`configuration-layer/declare-used-layers` in their `layers.el` files.

`helm-spacemacs-help` and `ivy-spacemacs-help` are updated to match the
changes in `core-configuration-layer.el`.

Rename some variables to make them more explicit:
`configuration-layer-no-layer` -> `configuration-layer-exclude-all-layers`
`configuration-layer-distribution` -> `configuration-layer-force-distribution`
2016-07-28 23:26:54 -04:00
..
+chat Define new variable: spacemacs-start-directory. 2016-06-23 00:19:34 -04:00
+checkers Format README files with spacefmt 2016-06-10 00:09:42 -04:00
+completion core: refactor layer system 2016-07-28 23:26:54 -04:00
+distributions core: refactor layer system 2016-07-28 23:26:54 -04:00
+emacs core: refactor layer system 2016-07-28 23:26:54 -04:00
+email
+frameworks core: refactor layer system 2016-07-28 23:26:54 -04:00
+fun Use :toggle keyword instead of when forms 2016-05-29 22:39:21 -04:00
+intl fix chinese layer readme 2016-07-25 18:16:32 +03:00
+lang Fix emmet expansion if yas isn’t turned on 2016-07-27 15:52:51 +09:00
+misc/nlinum core: special toggle API for minor modes 2016-05-31 22:33:44 -04:00
+os Use :toggle keyword instead of when forms 2016-05-29 22:39:21 -04:00
+pair-programming/floobits
+source-control github layer: fix table formatting in README 2016-07-26 22:58:34 -04:00
+spacemacs Set buffer-predicate to spacemacs/useful-buffer-p 2016-07-25 20:02:28 +09:00
+tags Clean up gtags readme 2016-07-17 17:36:07 +02:00
+themes rainbow-identifiers: do not overwrite theme values 2016-06-09 22:58:31 -04:00
+tools core: refactor layer system 2016-07-28 23:26:54 -04:00
+vim Fix error with which-key--buffer on startup 2016-06-18 00:19:59 -04:00
+web-services ivy/search-engine: fix call to ivy search engine select 2016-07-12 09:27:29 +03:00
rebox
auto-layer.el
LAYERS.org Add docker-tramp and docker.el 2016-06-09 23:29:20 -04:00