]> code.delx.au - gnu-emacs-elpa/commitdiff
Merge commit '0c3d5d96b732e31b8556d2f61cf9c7a2556ade26'
authorArtur Malabarba <bruce.connor.am@gmail.com>
Wed, 2 Sep 2015 00:30:13 +0000 (01:30 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Wed, 2 Sep 2015 00:30:13 +0000 (01:30 +0100)
1  2 
packages/aggressive-indent/aggressive-indent.el

index f9a0df313d453c36a7bdc3deeaf4a6d36b4be7b0,23b16dea9c75a6f1063209f41d61af7c67fc5170..54eeacb6f319a2355fe2a6be4059b68238f8a1ac
@@@ -1,10 -1,10 +1,10 @@@
 -;;; aggressive-indent.el --- Minor mode to aggressively keep your code always indented
 +;;; aggressive-indent.el --- Minor mode to aggressively keep your code always indented  -*- lexical-binding:t -*-
  
 -;; Copyright (C) 2014 Free Software Foundation, Inc.
 +;; Copyright (C) 2014, 2015 Free Software Foundation, Inc
  
  ;; Author: Artur Malabarba <emacs@endlessparentheses.com>
  ;; URL: http://github.com/Malabarba/aggressive-indent-mode
- ;; Version: 1.1.3
+ ;; Version: 1.2
  ;; Package-Requires: ((emacs "24.1") (names "20150125.9") (cl-lib "0.5"))
  ;; Keywords: indent lisp maint tools
  ;; Prefix: aggressive-indent
@@@ -70,7 -70,7 +70,7 @@@
  ;;
  ;; This program is free software; you can redistribute it and/or
  ;; modify it under the terms of the GNU General Public License
 -;; as published by the Free Software Foundation; either version 2
 +;; as published by the Free Software Foundation; either version 3
  ;; of the License, or (at your option) any later version.
  ;;
  ;; This program is distributed in the hope that it will be useful,
@@@ -222,6 -222,10 +222,10 @@@ change.
    '(when (boundp 'ac-completing)
       (add-to-list 'aggressive-indent--internal-dont-indent-if
                    'ac-completing)))
+ (eval-after-load 'multiple-cursors-core
+   '(when (boundp 'multiple-cursors-mode)
+      (add-to-list 'aggressive-indent--internal-dont-indent-if
+                   'multiple-cursors-mode)))
  (eval-after-load 'iedit
    '(when (boundp 'iedit-mode)
       (add-to-list 'aggressive-indent--internal-dont-indent-if
@@@ -285,12 -289,8 +289,8 @@@ If L and R are provided, use them for f
    "Indent current defun unobstrusively.
  Like `aggressive-indent-indent-defun', but without errors or
  messages.  L and R passed to `aggressive-indent-indent-defun'."
-   (unless (or (run-hook-wrapped
-                'aggressive-indent--internal-dont-indent-if
-                #'eval)
-               (aggressive-indent--run-user-hooks))
-     (cl-letf (((symbol-function 'message) #'ignore))
-       (ignore-errors (indent-defun l r)))))
+   (cl-letf (((symbol-function 'message) #'ignore))
+     (ignore-errors (indent-defun l r))))
  
  :autoload
  (defun indent-region-and-on (l r)
@@@ -342,12 -342,8 +342,8 @@@ until nothing more happens.
    "Indent region between L and R, and a bit more.
  Like `aggressive-indent-indent-region-and-on', but without errors
  or messages."
-   (unless (or (run-hook-wrapped
-                'aggressive-indent--internal-dont-indent-if
-                #'eval)
-               (aggressive-indent--run-user-hooks))
-     (cl-letf (((symbol-function 'message) #'ignore))
-       (ignore-errors (indent-region-and-on l r)))))
+   (cl-letf (((symbol-function 'message) #'ignore))
+     (ignore-errors (indent-region-and-on l r))))
  
  (defvar -changed-list nil
    "List of (left right) limit of regions changed in the last command loop.")
  (defun -indent-if-changed ()
    "Indent any region that changed in the last command loop."
    (when -changed-list
-     (while-no-input
-       (let ((inhibit-modification-hooks t)
-             (inhibit-point-motion-hooks t)
-             (indent-function
-              (if (cl-member-if #'derived-mode-p modes-to-prefer-defun)
-                  #'-softly-indent-defun
-                #'-softly-indent-region-and-on)))
-         (while -changed-list
-           (apply indent-function (car -changed-list))
-           (setq -changed-list (cdr -changed-list)))))))
+     (unless (or (run-hook-wrapped 'aggressive-indent--internal-dont-indent-if #'eval)
+                 (aggressive-indent--run-user-hooks))
+       (while-no-input
+         (let ((inhibit-modification-hooks t)
+               (inhibit-point-motion-hooks t)
+               (indent-function
+                (if (cl-member-if #'derived-mode-p modes-to-prefer-defun)
+                    #'-softly-indent-defun
+                  #'-softly-indent-region-and-on)))
+           (while -changed-list
+             (apply indent-function (car -changed-list))
+             (setq -changed-list (cdr -changed-list))))))))
  
  (defun -keep-track-of-changes (l r &rest _)
    "Store the limits (L and R) of each change in the buffer."