Mapping ( and ) in paredit mode

Nikolai Weibull now at disu.se
Fri Sep 19 22:01:37 CEST 2014


Hi!

I would like to map ( and ) as prefix keys to various other mappings
to paredit mode functions:

(evil-define-key 'normal paredit-mode-map
  "((" 'evil-paredit-backward-slurp-sexp
  "))" 'evil-paredit-forward-slurp-sexp
  ...)

This only works after a while for inexplicable reasons when you’ve
clicked around a bit and tried to execute a couple of mappings in a
buffer with Paredit enabled.  The problem is that ( is mapped to
backward-sentence in evil-motion-state-map, which seems to take
precedence.

How do I go about removing the mapping of ( to backward-sentence in
evil-motion-state-map for buffers that have Paredit enabled?

(I’m sure that this worked without any issues before, but I’ve changed
my configuration somewhat and now I get this weird behavior.)

Oh, using

     (define-key evil-normal-state-local-map "(("
'evil-paredit-backward-slurp-sexp)

seems to work.  So is that the preferred way of solving this situation?



More information about the implementations-list mailing list