move binds for smartparens into :bind of use-package

This commit is contained in:
Ivan Malison 2015-10-14 02:08:48 -07:00
parent 93df81a6c9
commit 867eb9fbe1

View File

@ -522,17 +522,18 @@ The current directory is assumed to be the project's root otherwise."
(setq paradox-execute-asynchronously t))) (setq paradox-execute-asynchronously t)))
(use-package smartparens (use-package smartparens
:bind (:map smartparens-mode-map
("C-{" . sp-backward-barf-sexp)
("C-)" . sp-forward-slurp-sexp)
("C-}" . sp-forward-barf-sexp)
("C-(" . sp-backward-slurp-sexp))
:config :config
(progn (progn
(require 'smartparens-config) (require 'smartparens-config)
(smartparens-global-mode 1) (smartparens-global-mode 1)
(sp-use-smartparens-bindings) (sp-use-smartparens-bindings)
(unbind-key "C-<backspace>" smartparens-mode-map) (unbind-key "C-<backspace>" smartparens-mode-map)
(unbind-key "M-<backspace>" smartparens-mode-map) (unbind-key "M-<backspace>" smartparens-mode-map)))
(bind-key "C-)" 'sp-forward-slurp-sexp smartparens-mode-map)
(bind-key "C-}" 'sp-forward-barf-sexp smartparens-mode-map)
(bind-key "C-(" 'sp-backward-slurp-sexp smartparens-mode-map)
(bind-key "C-{" 'sp-backward-barf-sexp smartparens-mode-map)))
(defclass indexed-mapping () (defclass indexed-mapping ()
((mapping :initarg :mapping :initform nil) ((mapping :initarg :mapping :initform nil)