]> code.delx.au - gnu-emacs-elpa/commitdiff
Readme
authorArtur Malabarba <bruce.connor.am@gmail.com>
Sun, 30 Nov 2014 11:12:03 +0000 (11:12 +0000)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Sun, 30 Nov 2014 11:12:03 +0000 (11:12 +0000)
Fixes #36

README.md

index 4f5ffce24226061f7aa7cece756df2d8278f8461..183a9440831e4cfc7939ddc316eeb87a2f73de00 100644 (file)
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ every programming mode, you can do something like:
     (global-aggressive-indent-mode 1)
     (add-to-list 'aggressive-indent-excluded-modes 'html-mode)
 
-### Manual Installation ###
+#### Manual Installation ####
 
 If you don't want to install from Melpa, you can download it manually,
 place it in your `load-path` along with its two dependencies:
@@ -47,3 +47,17 @@ place it in your `load-path` along with its two dependencies:
 Then require it with:
 
     (require 'aggressive-indent)
+
+### Customization ###
+
+The variable `aggressive-indent-dont-indent-if` lets you customize
+when you **don't** want indentation to happen.
+For instance, if you think it's annoying that lines jump around in
+`c++-mode` because you haven't typed the `;` yet, you could add the
+following clause:
+
+    (add-to-list
+     'aggressive-indent-dont-indent-if
+     '(and (derived-mode-p 'c++-mode)
+           (null (string-match "\\([;{}]\\|\\b\\(if\\|for\\|while\\)\\b\\)"
+                               (thing-at-point 'line)))))