Paredit uses a different way of defining the keymap. Whereas most minor modes define the keymap in the variable definition, Paredit calls paredit-define-keys
on top-level, and thus forcibly initializes the keymap.
In other words, you cannot prevent Paredit from setting up its bindings. You need to remove all keybindings in the keymap with (define-key paredit-mode-map … nil)
to get rid of these.
Edit: You cannot “reset” keymaps by assigning a new keymap to the variable. (setq paredit-mode-map …)
will change the variable paredit-mode-map
, it will not change the actual keymap being used by Paredit mode.
The binding of this variable is only evaluated once at definition time, i.e. during the evaluation of define-minor-mode
. This macro internally calls add-minor-mode
, and passes to this function the current value of the keymap variable. All future use of the mode refers to this keymap only. The keymap variable is never again evaluated by the minor mode, thus changing its binding has no effect whatsoever.
If you want to change the keymap, you have to re-bind the variable before define-minor-mode
is evaluated, i.e. before the corresponding library is loaded. Changing it in an eval-after-load
form is hence completely useless.
Normally, changing the keymap variable before the library is loaded works well, because most modes define the keymap within the body of defvar
. defvar
however will not change the value of a variable if it already has a value. Thus, if the variable already has a keymap, it won't be touched.
However, as I said, Paredit doesn't respect this pattern, and instead forcibly add its bindings to the keymap. Thus changing it is pointless, because Paredit will add its bindings anyway.
As I said, you have to manually clear the existing keymap by un-defining every single of its keys.
TL;DR: Use Smartparens, really! It covers all of Paredit, it's flexible, it's powerful, it's extensible, in short it's just good. And it lets you choose whatever keybindings you want.