From e1dfd1dce911a06284d81eb07120de1ad32aa0ac Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 13 Mar 2017 14:29:26 +0100 Subject: 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 --- tag-emacs/emacs.d/init.org | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'tag-emacs') 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 "" - auto-indent-key-for-end-of-line-insert-char-then-newline "" - 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 -- cgit 1.4.1