]> code.delx.au - gnu-emacs-elpa/commitdiff
Don't call `js2-mode-edit' when inside `indent-region'
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 25 Apr 2011 14:49:58 +0000 (18:49 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 25 Apr 2011 14:49:58 +0000 (18:49 +0400)
js2-mode.el

index 805e9c1cff12a5e793f5691a55bfb4df189aa7e1..8788d9148d5d6fbd194986983615d7690a439c81 100644 (file)
@@ -10367,8 +10367,11 @@ If so, we don't ever want to use bounce-indent."
 (defun js2-indent-region (start end)
   "Indent the region, but don't use bounce indenting."
   (let ((js2-bounce-indent-p nil)
-        (indent-region-function nil))
-    (indent-region start end nil)))  ; nil for byte-compiler
+        (indent-region-function nil)
+        (after-change-functions (delq 'js2-mode-edit
+                                      after-change-functions)))
+    (indent-region start end nil) ; nil for byte-compiler
+    (js2-mode-edit start end (- end start))))
 
 ;;;###autoload (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))