]> code.delx.au - gnu-emacs-elpa/commitdiff
Another quickfix
authorArtur Malabarba <bruce.connor.am@gmail.com>
Thu, 30 Oct 2014 21:49:25 +0000 (21:49 +0000)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Thu, 30 Oct 2014 21:49:25 +0000 (21:49 +0000)
aggressive-indent.el

index 25b63b44576dd18ffa9f465d48d9523a5cb60af7..012e73130c552df14506eba278c1178ebbcf98ae 100644 (file)
@@ -254,7 +254,13 @@ Throw an error if parentheses are unbalanced."
   "Indent current defun unobstrusively.
 Like `aggressive-indent-indent-defun', but wrapped in a
 `aggressive-indent--do-softly'."
-  (aggressive-indent--do-softly (indent-defun)))
+  (unless (or (run-hook-wrapped
+               'aggressive-indent--internal-dont-indent-if
+               #'eval)
+              (aggressive-indent--run-user-hooks))
+    (ignore-errors
+      (cl-letf (((symbol-function 'message) #'ignore))
+        (indent-defun)))))
 
 :autoload
 (defun indent-region-and-on (l r)
@@ -294,7 +300,13 @@ until nothing more happens."
   "Indent current defun unobstrusively.
 Like `aggressive-indent-indent-region-and-on', but wrapped in a
 `aggressive-indent--do-softly'."
-  (aggressive-indent--do-softly (indent-region-and-on l r)))
+  (unless (or (run-hook-wrapped
+               'aggressive-indent--internal-dont-indent-if
+               #'eval)
+              (aggressive-indent--run-user-hooks))
+    (ignore-errors
+      (cl-letf (((symbol-function 'message) #'ignore))
+        (indent-region-and-on l r)))))
 
 (defvar -changed-list-right nil
   "List of right limit of regions changed in the last command loop.")