I use vanilla Emacs with evil. I did not install smartparens but it is present and enabled on my system as a dependency of something.

I need to rebind the M-s keys to something other than the default sp-splice-sexp.

The output of describe-key for M-s is currently:

M-s runs the command sp-splice-sexp, which is an interactive compiled
Lisp function in ‘smartparens.el’.

It is bound to M-s, <normal-state> M-s.

Going into smartparens.el, I am able to see that a smartparens-mode-map is defined and M-s belongs to it.

I have tried in vain to do:

(define-key smartparens-mode-map (kbd "M-s") nil)


(evil-define-key 'normal smartparens-mode-map (kbd "M-s") nil)


(define-key evil-normal-state-map (kbd "M-s") nil)

The list of the MELPA packages I use is:

auto-package-update atom-one-dark-theme slime
company evil column-enforce-mode paredit evil-cleverparens
highlight-parentheses key-chord

One of these packages must be loading smartparens and defining the keymap but I can't find which one. Is there a way perhaps to see which keymap or evil keymap to change?

  • Have you tried to disable smartparens-mode? – Stefan May 12 at 20:10
  • I have tried (smartparens-mode -1) in my init.el and also (add-hook 'prog-mode-hook (lambda () (smartparens-mode -1)) t). No changes whatsoever, the shortcut still exists in prog-mode or wherever else. – Thomas Houllier May 12 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.