From 1aec999f63fc7b34f2ba2cd637a14dbda03476d1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 2 Feb 2015 02:01:29 -0500 Subject: [PATCH] Fix web-mode deferred load * fix smartparens --- core/core-editor.el | 6 +++--- init/init-web.el | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 96cd476fa..3142fe157 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -18,8 +18,8 @@ sp-autoescape-string-quote nil) ;; Handle newlines + spaces - (sp-pair "{" "}" :post-handlers '(("||\n[i]" "RET") ("| " "SPC")) :unless '(sp-point-before-word-p sp-point-before-same-p)) - (sp-pair "(" ")" :post-handlers '(("||\n[i]" "RET") ("| " "SPC")) :unless '(sp-point-before-word-p sp-point-before-same-p)) + (sp-pair "{" "}" :post-handlers '(("||\n[i]" "RET") ("| " " ")) :unless '(sp-point-before-word-p sp-point-before-same-p)) + (sp-pair "(" ")" :post-handlers '(("||\n[i]" "RET") ("| " " ")) :unless '(sp-point-before-word-p sp-point-before-same-p)) ;; Auto-close more conservatively (sp-pair "[" nil :unless '(sp-point-before-word-p sp-point-before-same-p)) @@ -27,7 +27,7 @@ (sp-pair "\"" nil :unless '(sp-point-after-word-p sp-point-before-word-p sp-point-before-same-p)) (sp-with-modes '(json-mode js2-mode ruby-mode enh-ruby-mode python-mode) - (sp-local-pair "[" "]" :post-handlers '(:add "| " "SPC"))) + (sp-local-pair "[" nil :post-handlers '(("||\n[i]" "RET")))) (after "yasnippet" (defadvice yas-expand (before advice-for-yas-expand activate) diff --git a/init/init-web.el b/init/init-web.el index b07ce7117..4d6418d1a 100644 --- a/init/init-web.el +++ b/init/init-web.el @@ -6,6 +6,7 @@ (bind 'motion css-mode-map "gQ" 'web-beautify-css))) (use-package web-mode + :commands web-mode :mode (("\\.\\(p\\)?htm\\(l\\)?$" . web-mode) ("\\.tpl\\(\\.php\\)?$" . web-mode) ("\\.erb$" . web-mode)