summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2017-03-13 14:29:26 +0100
committerAlan Pearce2017-03-13 14:29:26 +0100
commite1dfd1dce911a06284d81eb07120de1ad32aa0ac (patch)
tree1f0e466fa88c5f8ea9a49fec7bc153665a7cfb52
parent2ec907b93e9b65bc174e99d7c5bb7fa9a291dc43 (diff)
downloadnixfiles-e1dfd1dce911a06284d81eb07120de1ad32aa0ac.tar.lz
nixfiles-e1dfd1dce911a06284d81eb07120de1ad32aa0ac.tar.zst
nixfiles-e1dfd1dce911a06284d81eb07120de1ad32aa0ac.zip
Emacs: Remove auto-indent-mode
Not necessary with electric-indent-mode, which I’ve already set up in
c-mode-hook.

It was responsible for all the `looking-back` errors when compiling or
executing init.el
-rw-r--r--tag-emacs/emacs.d/init.org30
1 files changed, 0 insertions, 30 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 6f35f026..7b205ccd 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -742,33 +742,6 @@ tabstops is probably never going to happen.
               indent-tabs-mode nil)
 #+END_SRC
 
-** auto-indent-mode
-
-Don’t make me think, just indent it!  Unless it’s a
-whitespace-sensitive language, of course.
-
-#+BEGIN_SRC emacs-lisp
-(use-package auto-indent-mode
-  :config (progn
-            (setq auto-indent-key-for-end-of-line-then-newline "<C-return>"
-                  auto-indent-key-for-end-of-line-insert-char-then-newline "<C-S-return>"
-                  auto-indent-blank-lines-on-move nil
-                  auto-indent-assign-indent-level 2
-                  auto-indent-backward-delete-char-behavior nil
-                  auto-indent-delete-trailing-whitespace-on-save-file t
-                  auto-indent-mode-untabify-on-yank-or-paste nil
-                  auto-indent-start-org-indent nil
-                  auto-indent-known-indent-level-variables
-                  (remq 'lisp-body-indent auto-indent-known-indent-level-variables))
-            (add-to-list 'auto-indent-disabled-modes-list 'jinja2-mode)
-            (add-to-list 'auto-indent-disabled-modes-list 'yaml-mode)
-            (add-to-list 'auto-indent-disabled-modes-list 'saltstack-mode)
-            (add-to-list 'auto-indent-disabled-modes-list 'nix-mode)
-            (add-to-list 'auto-indent-disabled-modes-list 'coffee-mode)
-            (add-to-list 'auto-indent-disabled-modes-list 'yaml-mode)
-            (add-to-list 'auto-indent-disabled-modes-list 'ansible-mode)
-            (auto-indent-global-mode)))
-#+END_SRC
 
 ** smart-tabs-mode
 
@@ -2010,14 +1983,11 @@ it though
                        (fboundp #'do-it))
                   (do-it name)))
             (advice-add 'imenu-add-to-menubar :around #'js2--imenu-around)
-            (defun ap/javascript-setup ()
-              (auto-indent-mode -1))
             (defun ap/js2-prev-error ()
               (interactive)
               (js2-next-error -1))
             (bind-key "M-g M-n" #'js2-next-error js2-mode-map)
             (bind-key "M-g M-p" #'ap/js2-prev-error js2-mode-map)
-            (add-hook 'js2-mode-hook #'ap/javascript-setup)
             (setq js2-basic-offset 2
                   js2-include-node-externs t)))
 #+END_SRC