emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r116416: * lisp/progmodes/js.el (js-indent-line): Do


From: Dmitry Gutov
Subject: [Emacs-diffs] trunk r116416: * lisp/progmodes/js.el (js-indent-line): Don't widen.
Date: Wed, 12 Feb 2014 06:23:52 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116416
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Wed 2014-02-12 08:23:42 +0200
message:
  * lisp/progmodes/js.el (js-indent-line): Don't widen.
  http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00276.html
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/js.el           js.el-20091113204419-o5vbwnq5f7feedwu-10919
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-02-12 01:20:34 +0000
+++ b/lisp/ChangeLog    2014-02-12 06:23:42 +0000
@@ -1,3 +1,8 @@
+2014-02-12  Dmitry Gutov  <address@hidden>
+
+       * 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  <address@hidden>
 
        * emacs-lisp/package.el (package-menu-mode-map): Tweak menu.

=== modified file 'lisp/progmodes/js.el'
--- a/lisp/progmodes/js.el      2014-01-01 07:43:34 +0000
+++ b/lisp/progmodes/js.el      2014-02-12 06:23:42 +0000
@@ -1905,13 +1905,11 @@
 (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
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]