http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00276.html
+2014-02-12 Dmitry Gutov <dgutov@yandex.ru>
+
+ * progmodes/js.el (js-indent-line): Don't widen.
+ http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00276.html
+
2014-02-12 Glenn Morris <rgm@gnu.org>
* emacs-lisp/package.el (package-menu-mode-map): Tweak menu.
(defun js-indent-line ()
"Indent the current line as JavaScript."
(interactive)
- (save-restriction
- (widen)
- (let* ((parse-status
- (save-excursion (syntax-ppss (point-at-bol))))
- (offset (- (current-column) (current-indentation))))
- (indent-line-to (js--proper-indentation parse-status))
- (when (> offset 0) (forward-char offset)))))
+ (let* ((parse-status
+ (save-excursion (syntax-ppss (point-at-bol))))
+ (offset (- (current-column) (current-indentation))))
+ (indent-line-to (js--proper-indentation parse-status))
+ (when (> offset 0) (forward-char offset))))
;;; Filling