emacs-evil / evil

The extensible vi layer for Emacs.
GNU General Public License v3.0
3.38k stars 281 forks source link

enable normal mode by default in Custom-mode buffers #640

Open TheBB opened 8 years ago

TheBB commented 8 years ago

Originally reported by: Wouter Bolsterlee (Bitbucket: wbolster, GitHub: wbolster)


Is there a reason Custom-mode buffers are in Emacs state by default? There is some special handling of buttons and so on inside evil, so it seems to me there is no reason to treat Custom-mode (note the capital) as special...

(evil-set-initial-state 'Custom-mode 'normal)

TheBB commented 8 years ago

Original comment by Frank Fischer (Bitbucket: lyro, GitHub: lyro):


I have no idea. It has been there for a very long time now.

Note that the mouse handling in Evil has its own quirks (actually, I'm quite sure that it does not work in all situation, but never found the time to clean up and improve the code). It's nice to hear that it works in Custom-mode.

From my point of view, we can remove Custom-mode from evil-emacs-state-modes by default. I just do not know if it makes problems.

TheBB commented 8 years ago

Original comment by Wouter Bolsterlee (Bitbucket: wbolster, GitHub: wbolster):


This is perhaps nice to add to Custom-mode so that mouse clicking on a button works as expected instead of starting a drag selection:

<down-mouse-1> at that spot runs the command widget-button-click