lisp-interaction-mode: indent using spaces

Many users set `indent-tabs-mode' global value to nil.  And I agree with
those users, this should have been the default.  But the reality is that
it isn't the default.

If you change the default locally, then your default is different from
the "default default", which is a problem because most files that were
authored by people who prefer to use tabs do NOT explicitly set the
file local value to t, because that doing so would (theoretically) be
redundant.

If you do set `indent-tabs-mode' to nil despite this, then you will end
up using spaces for indentation in files whose author decided to use
tabs.  What I do instead is to set the file-/buffer-local value for all
files whose author I am.  That's a bit inconvenient, but if I didn't do
that then I would have to check every contributions for tabs.
This commit is contained in:
Jonas Bernoulli 2016-05-17 18:46:00 +02:00
parent 34217222ed
commit f08084b363

View File

@ -89,7 +89,10 @@
(use-package lisp-mode
:config
(add-hook 'emacs-lisp-mode-hook 'outline-minor-mode)
(add-hook 'emacs-lisp-mode-hook 'reveal-mode))
(add-hook 'emacs-lisp-mode-hook 'reveal-mode)
(defun indent-spaces-mode ()
(setq indent-tabs-mode nil))
(add-hook 'lisp-interaction-mode-hook #'indent-spaces-mode))
(use-package magit
:defer t