* lisp/progmodes/js.el (js-indent-line): Don't widen.
http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00276.html
This commit is contained in:
parent
6227467f0b
commit
5af9fbadd1
2 changed files with 10 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
|
@ -1905,13 +1905,11 @@ In particular, return the buffer position of the first `for' kwd."
|
|||
(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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue