branch: externals/aggressive-indent commit 5959b48e94493738ead6fc91f18e70155962ffba Author: Artur Malabarba <bruce.connor...@gmail.com> Commit: Artur Malabarba <bruce.connor...@gmail.com>
Experiment with testing `indent-line-function` instead of excluded-modes --- aggressive-indent.el | 41 ++--------------------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/aggressive-indent.el b/aggressive-indent.el index d03ba9b..fbc5354 100644 --- a/aggressive-indent.el +++ b/aggressive-indent.el @@ -112,45 +112,7 @@ Please include this in your report!" (repeat :tag "List of major-modes to avoid `electric-indent-mode'." symbol)) :package-version '(aggressive-indent . "0.3.1")) -(defcustom aggressive-indent-excluded-modes - '( - bibtex-mode - cider-repl-mode - coffee-mode - comint-mode - conf-mode - Custom-mode - diff-mode - doc-view-mode - dos-mode - erc-mode - feature-mode - fortran-mode - f90-mode - jabber-chat-mode - haml-mode - haskell-mode - haskell-interactive-mode - image-mode - inf-ruby-mode - makefile-mode - makefile-gmake-mode - minibuffer-inactive-mode - netcmd-mode - python-mode - sass-mode - scala-mode - slim-mode - special-mode - shell-mode - snippet-mode - eshell-mode - tabulated-list-mode - term-mode - TeX-output-mode - text-mode - yaml-mode - ) +(defcustom aggressive-indent-excluded-modes nil "Modes in which `aggressive-indent-mode' should not be activated. This variable is only used if `global-aggressive-indent-mode' is active. If the minor mode is turned on with the local command, @@ -458,6 +420,7 @@ typing, try tweaking this number." (if aggressive-indent-mode (if (and global-aggressive-indent-mode (or (cl-member-if #'derived-mode-p aggressive-indent-excluded-modes) + (equal indent-line-function #'indent-relative) (memq major-mode '(text-mode fundamental-mode)) buffer-read-only)) (aggressive-indent-mode -1)