fourier / ztree

Directory tree comparison mode for Emacs
http://www.emacswiki.org/emacs/ZtreeDiff
GNU General Public License v3.0
239 stars 21 forks source link

ztree does not play well with electric-indent-mode #5

Closed tuhdo closed 10 years ago

tuhdo commented 10 years ago

If electric-indent-mode is turned on, it could mess up with ztree formatting. With emacs 24.4, there will be a function called electric-indent-local-mode to disable electric-indent locally. This happens with yaml-mode as well, you can read further here: A Peek at Emacs 24.4: Auto-indentation by Default

Meanwhile, to disable electric-indent-mode locally in Emacs 24.3, we can do this:

(add-hook 'yaml-mode-hook
          (lambda ()
            (add-hook 'electric-indent-functions
                      (lambda () 'no-indent) nil 'local)))

Taken from SO: How to turn of electric-indent-mode for specific Major mode?

You should update the documentation about this issue and note new users about this issue and instruct them to turn off electric-indent-mode if they use.

fourier commented 10 years ago

Fixed - commit was with the wrong issue id