From 87545755506ef1fc50ae9b0f7bc0f7b9737580bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Codru=C8=9B=20Constantin=20Gu=C8=99oi?= Date: Thu, 8 Jun 2017 20:59:40 +0300 Subject: [PATCH] Fixes insert point for lazy loaded layers A recent change in the `.spacemacs.template` made it so that the `dotspacemacs-configuration-layers` variable name can be found inside a comment right before the expression that sets it's value. This makes the lazy insertion fail to detect the proper place to add lazy loaded layers. This fix solves the immediate problem but maybe a better solution can be found. --- core/core-dotspacemacs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-dotspacemacs.el b/core/core-dotspacemacs.el index eeaef4b5c..5cc169e5e 100644 --- a/core/core-dotspacemacs.el +++ b/core/core-dotspacemacs.el @@ -446,7 +446,7 @@ Returns non nil if the layer has been effectively inserted." (with-current-buffer (find-file-noselect (dotspacemacs/location)) (beginning-of-buffer) (let ((insert-point (re-search-forward - "dotspacemacs-configuration-layers\\s-*\n?[^(]*\\((\\)"))) + "[^`]dotspacemacs-configuration-layers\\s-*\n?[^(]*\\((\\)"))) (insert (format "%S" layer-name)) (unless (equal (point) (point-at-eol)) (insert "\n"))