]> code.delx.au - gnu-emacs-elpa/commitdiff
Merge commit '1b831d21ac9688e3f31703f0b492202f6d24a75b'
authorArtur Malabarba <bruce.connor.am@gmail.com>
Tue, 9 Feb 2016 17:57:33 +0000 (17:57 +0000)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Tue, 9 Feb 2016 17:57:33 +0000 (17:57 +0000)
1  2 
packages/aggressive-indent/README.md
packages/aggressive-indent/aggressive-indent.el

index 8873568ec3b2d84d41203188b6da674846441d0e,68e07adc1b891b9208c8aa3b5e7187105d49eb25..68e07adc1b891b9208c8aa3b5e7187105d49eb25
@@@ -39,10 -39,8 +39,8 @@@ every programming mode, you can do some
  #### 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:
- - [Names](https://github.com/Bruce-Connor/names/)
- - and `cl-lib` (which you should already have if your `emacs-version` is at least 24.3).
+ place it in your `load-path` along with its dependency `cl-lib` (which
+ you should already have if your `emacs-version` is at least 24.3).
  
  Then require it with:
  
index a4424cbbedcc283814ab42f1fbb5c15f546077ac,187b76dd49fd56931b141d2356538dc5fdda86e9..67c3af8571009ef5c2955222627db959cf6c2306
@@@ -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.4
+ ;; URL: https://github.com/Malabarba/aggressive-indent-mode
+ ;; Version: 1.5
  ;; Package-Requires: ((emacs "24.1") (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,
  ;; GNU General Public License for more details.
  ;;
  
- ;;; Change Log:
- ;; 0.3.1 - 2014/10/30 - Define new delete-backward bound to backspace.
- ;; 0.3   - 2014/10/23 - Implement a smarter engine for non-lisp modes.
- ;; 0.2   - 2014/10/20 - Reactivate `electric-indent-mode'.
- ;; 0.2   - 2014/10/19 - Add variable `aggressive-indent-dont-indent-if', so the user can prevent indentation.
- ;; 0.1   - 2014/10/15 - Release.
  ;;; Code:
  
  (require 'cl-lib)
@@@ -92,6 -86,7 +86,7 @@@
  (defgroup aggressive-indent nil
    "Customization group for aggressive-indent."
    :prefix "aggressive-indent-"
+   :group 'electricity
    :group 'indent)
  
  (defun aggressive-indent-bug-report ()
@@@ -105,7 -100,7 +100,7 @@@ Please include this in your report!
                 (require 'lisp-mnt)
                 (lm-version)))
             emacs-version)
-   (browse-url "https://github.com/Bruce-Connor/aggressive-indent-mode/issues/new"))
+   (browse-url "https://github.com/Malabarba/aggressive-indent-mode/issues/new"))
  
  (defvar aggressive-indent-mode)
  
      jabber-chat-mode
      haml-mode
      haskell-mode
+     haskell-interactive-mode
      image-mode
      makefile-mode
      makefile-gmake-mode
@@@ -234,6 -230,10 +230,10 @@@ This is for internal use only.  For use
    '(when (boundp 'iedit-mode)
       (add-to-list 'aggressive-indent--internal-dont-indent-if
                    'iedit-mode)))
+ (eval-after-load 'evil
+   '(when (boundp 'iedit-mode)
+      (add-to-list 'aggressive-indent--internal-dont-indent-if
+                   'iedit-mode)))
  (eval-after-load 'coq
    '(add-to-list 'aggressive-indent--internal-dont-indent-if
                  '(and (derived-mode-p 'coq-mode)
@@@ -335,7 -335,7 +335,7 @@@ until nothing more happens.
                                ;; not at all, stop at the limit.
                                (< (point) point-limit))))
                (forward-line 1)
-               (skip-chars-forward "[:blank:]\n\r\xc"))))
+               (skip-chars-forward "[:blank:]\n\r\f"))))
        (goto-char p))))
  
  (defun aggressive-indent--softly-indent-region-and-on (l r &rest _)
@@@ -353,18 -353,21 +353,21 @@@ or messages.
  (defun aggressive-indent--indent-if-changed ()
    "Indent any region that changed in the last command loop."
    (when aggressive-indent--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 aggressive-indent-modes-to-prefer-defun)
-                    #'aggressive-indent--softly-indent-defun #'aggressive-indent--softly-indent-region-and-on)))
-           (while aggressive-indent--changed-list
-             (apply indent-function (car aggressive-indent--changed-list))
-             (setq aggressive-indent--changed-list
-                   (cdr aggressive-indent--changed-list))))))))
+     (save-excursion
+       (save-selected-window
+         (unless (or (run-hook-wrapped 'aggressive-indent--internal-dont-indent-if #'eval)
+                     (aggressive-indent--run-user-hooks))
+           (while-no-input
+             (redisplay)
+             (let ((inhibit-modification-hooks t)
+                   (inhibit-point-motion-hooks t)
+                   (indent-function
+                    (if (cl-member-if #'derived-mode-p aggressive-indent-modes-to-prefer-defun)
+                        #'aggressive-indent--softly-indent-defun #'aggressive-indent--softly-indent-region-and-on)))
+               (while aggressive-indent--changed-list
+                 (apply indent-function (car aggressive-indent--changed-list))
+                 (setq aggressive-indent--changed-list
+                       (cdr aggressive-indent--changed-list))))))))))
  
  (defun aggressive-indent--keep-track-of-changes (l r &rest _)
    "Store the limits (L and R) of each change in the buffer."
  ;;;###autoload
  (define-minor-mode aggressive-indent-mode
    nil nil " =>"
-   '(("\ 3\11" . aggressive-indent-indent-defun)
+   `((,(kbd "C-c C-q") . aggressive-indent-indent-defun)
      ([backspace]
       menu-item "maybe-delete-indentation" ignore :filter
       (lambda (&optional _)