Deny keymap changes made by `evil-integration'

Alexander Shukaev haroogan at gmail.com
Mon Jul 20 17:09:49 CEST 2015


Hello,

`evil-integration' has quite some forms like

(eval-after-load 'dired
  '(progn
     ;; use the standard Dired bindings as a base
     (defvar dired-mode-map)
     (evil-make-overriding-map dired-mode-map 'normal)
     (evil-add-hjkl-bindings dired-mode-map 'normal
       "J" 'dired-goto-file                   ; "j"
       "K" 'dired-do-kill-lines               ; "k"
       "r" 'dired-do-redisplay                ; "l"
       ;; ":d", ":v", ":s", ":e"
       ";" (lookup-key dired-mode-map ":"))))

for various packages.  I would like to learn how to either revert
these changes back to the default state (i.e. `dired-mode-map' should
be crystal clean as it was before loading `evil') or, even better,
prevent `evil-integration' from doing such changes.  For instance,
I've tried

(let ((dired-mode-map))
  (require 'evil)
  ...
)

and it didn't work.  Any ideas?

P.S.: My personal opinion is that such intrusive (and silent) changes
to the default settings should be avoided by default.  In other words,
I have nothing against having an option to turn these on, but there
surely must be a simple Boolean option to turn such default
modifications off.

Kind regards,
Alexander



More information about the implementations-list mailing list