diff options
| author | Stefan Monnier | 2014-05-31 21:53:04 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-05-31 21:53:04 -0400 |
| commit | ffa8a2db083165fc9f8c38ba9636e2c7801fcd2f (patch) | |
| tree | f2f5034b80b590b6b833018e4e42d078e7e9ef59 | |
| parent | 8889b935d16baa59a76417d465f54501e8246b1a (diff) | |
| download | emacs-ffa8a2db083165fc9f8c38ba9636e2c7801fcd2f.tar.gz emacs-ffa8a2db083165fc9f8c38ba9636e2c7801fcd2f.zip | |
* lisp/progmodes/js.el (js-indent-line): Don't mix columns and chars.
Fixes: debbugs:17619
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/progmodes/js.el | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 20257f089d9..f1e3af8123d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-06-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * progmodes/js.el (js-indent-line): Don't mix columns and chars | ||
| 4 | (bug#17619). | ||
| 5 | |||
| 1 | 2014-05-31 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2014-05-31 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * subr.el (set-transient-map): Don't wait for some "nested" | 8 | * subr.el (set-transient-map): Don't wait for some "nested" |
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 5be1373213e..a8f0d556ec4 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el | |||
| @@ -1907,7 +1907,7 @@ In particular, return the buffer position of the first `for' kwd." | |||
| 1907 | (interactive) | 1907 | (interactive) |
| 1908 | (let* ((parse-status | 1908 | (let* ((parse-status |
| 1909 | (save-excursion (syntax-ppss (point-at-bol)))) | 1909 | (save-excursion (syntax-ppss (point-at-bol)))) |
| 1910 | (offset (- (current-column) (current-indentation)))) | 1910 | (offset (- (point) (save-excursion (back-to-indentation) (point))))) |
| 1911 | (indent-line-to (js--proper-indentation parse-status)) | 1911 | (indent-line-to (js--proper-indentation parse-status)) |
| 1912 | (when (> offset 0) (forward-char offset)))) | 1912 | (when (> offset 0) (forward-char offset)))) |
| 1913 | 1913 | ||