Use + instead of ! for layer categories

Helm seems to treat "!" specially in pattern matching, so having a ! in
the pattern string when traversing directories is problematic. This
change fixes #2737, because as far as I can tell "+" has no special
meaning in a helm pattern.

Of course, we can choose a different character, but I'm fond of "+" as
representing "more layers here".
This commit is contained in:
justbur 2015-09-10 20:21:27 -04:00 committed by syl20bnr
parent 30e6d213aa
commit 6eab954afe
359 changed files with 55 additions and 55 deletions

View File

@ -134,7 +134,7 @@ the path for this layer.")
(defvar configuration-layer-categories '()
"List of strings corresponding to category names. A category is a
directory with a name starting with `!'.")
directory with a name starting with `+'.")
(defun configuration-layer/sync ()
"Synchronize declared layers in dotfile with spacemacs."
@ -390,7 +390,7 @@ Possible return values:
nil - the directory is a regular directory."
(when (file-directory-p path)
(if (string-match
"^!" (file-name-nondirectory
"^+" (file-name-nondirectory
(directory-file-name
(concat configuration-layer-directory path))))
'category
@ -405,14 +405,14 @@ Possible return values:
(defun configuration-layer//get-category-from-path (dirpath)
"Return a category symbol from the given DIRPATH.
The directory name must start with `!'.
The directory name must start with `+'.
Returns nil if the directory is not a category."
(when (file-directory-p dirpath)
(let ((dirname (file-name-nondirectory
(directory-file-name
(concat configuration-layer-directory
dirpath)))))
(when (string-match "^!" dirname)
(when (string-match "^+" dirname)
(intern (substring dirname 1))))))
(defun configuration-layer//discover-layers ()
@ -479,7 +479,7 @@ path."
(dolist (layer dotspacemacs-configuration-layers)
(let ((layer-name (if (listp layer) (car layer) layer)))
(if (ht-contains? configuration-layer-paths layer-name)
(unless (string-match-p "!distribution"
(unless (string-match-p "+distribution"
(ht-get configuration-layer-paths layer-name))
(push (configuration-layer/make-layer layer)
configuration-layer--layers))

View File

@ -54,7 +54,7 @@ exists. Otherwise, fallback to ~/.spacemacs")
(defvar dotspacemacs-distribution 'spacemacs
"Base distribution to use. This is a layer contained in the directory
`!distribution'. For now available distributions are `spacemacs-core'
`+distribution'. For now available distributions are `spacemacs-core'
or `spacemacs'.")
(defvar dotspacemacs-configuration-layer-path '()

View File

@ -185,7 +185,7 @@ package name does not match theme name + `-theme' suffix.")
(eq 'solarized-dark theme))
(add-to-list 'load-path
(concat configuration-layer-directory
"!distribution/spacemacs/local/solarized-theme/"))
"+distribution/spacemacs/local/solarized-theme/"))
(require 'solarized)
(deftheme solarized-dark
"The dark variant of the Solarized colour theme")

View File

@ -48,10 +48,10 @@ chatroom]] and ask your questions there. It will be a pleasure to help you to
contribute!
** Submitting a configuration layer
Contributed configuration layers are stored in the =contrib= folder. The
=contrib= folder also contains categories prefixed with =!= to put your
Contributed configuration layers are stored in the =layers= folder. The
=layers= folder also contains categories prefixed with =+= to put your
layers in. For example a layer for a language would go in the
=contrib/!lang= folder.
=layers/+lang= folder.
It is recommended to join a =README.org= file with your layer:
- ideally this file should document the packages of your layer as well as the

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Some files were not shown because too many files have changed in this diff Show More