[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master c47a894 11/38: Fix #247, indentation inside block comments
From: |
Dmitry Gutov |
Subject: |
[elpa] master c47a894 11/38: Fix #247, indentation inside block comments |
Date: |
Wed, 09 Sep 2015 18:41:38 +0000 |
branch: master
commit c47a894639750fae2508d54ada6467a178c498fc
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Fix #247, indentation inside block comments
---
js2-old-indent.el | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/js2-old-indent.el b/js2-old-indent.el
index 9b1c929..efc9053 100644
--- a/js2-old-indent.el
+++ b/js2-old-indent.el
@@ -396,7 +396,7 @@ indentation is aligned to that column."
(save-excursion
(back-to-indentation)
(when (nth 4 parse-status)
- (cl-return (js2-lineup-comment parse-status)))
+ (cl-return-from js2-proper-indentation (js2--comment-indent
parse-status)))
(let* ((at-closing-bracket (looking-at "[]})]"))
(same-indent-p (or at-closing-bracket
(looking-at "\\_<case\\_>[^:]")
@@ -458,17 +458,13 @@ indentation is aligned to that column."
(t 0)))))
-(defun js2-lineup-comment (parse-status)
- "Indent a multi-line block comment continuation line."
- (let* ((beg (nth 8 parse-status))
- (first-line (js2-same-line beg))
- (offset (save-excursion
- (goto-char beg)
- (if (looking-at "/\\*")
- (+ 1 (current-column))
- 0))))
- (unless first-line
- (indent-line-to offset))))
+(defun js2--comment-indent (parse-status)
+ "Indentation inside a multi-line block comment continuation line."
+ (save-excursion
+ (goto-char (nth 8 parse-status))
+ (if (looking-at "/\\*")
+ (+ 1 (current-column))
+ 0)))
(defun js2-indent-line (&optional bounce-backwards)
"Indent the current line as JavaScript source text."
- [elpa] master c9a1cde 01/38: Fix indentation tests, by always loading js2-old-indent, (continued)
- [elpa] master c9a1cde 01/38: Fix indentation tests, by always loading js2-old-indent, Dmitry Gutov, 2015/09/09
- [elpa] master f354e9a 02/38: Try a containerized Travis build, Dmitry Gutov, 2015/09/09
- [elpa] master a622fb3 04/38: Remove outdated reference, Dmitry Gutov, 2015/09/09
- [elpa] master 00245fc 06/38: Try to use $EMACS implicitly, Dmitry Gutov, 2015/09/09
- [elpa] master 5e546d3 05/38: Fix indent, Dmitry Gutov, 2015/09/09
- [elpa] master 3a44f30 03/38: Hopefully fix the matrix, Dmitry Gutov, 2015/09/09
- [elpa] master c14fdf6 07/38: This shit is confusing, Dmitry Gutov, 2015/09/09
- [elpa] master bb3f677 08/38: ..., Dmitry Gutov, 2015/09/09
- [elpa] master 4bd8df9 09/38: Revert the "containerized build" commits, because Travis still hasn't, Dmitry Gutov, 2015/09/09
- [elpa] master 9cdd4c6 10/38: -L ., Dmitry Gutov, 2015/09/09
- [elpa] master c47a894 11/38: Fix #247, indentation inside block comments,
Dmitry Gutov <=
- [elpa] master 242af01 14/38: Handle @property like @param, and handle aliases, Dmitry Gutov, 2015/09/09
- [elpa] master c68646a 12/38: Never enable js2-minor-mode in js2-mode, Dmitry Gutov, 2015/09/09
- [elpa] master 5beb8ea 13/38: Define js2-re-search-forward as an alias as well, Dmitry Gutov, 2015/09/09
- [elpa] master fc56c58 16/38: js2-define-destruct-symbols-internal: Anticipate js2-getter-setter-node, Dmitry Gutov, 2015/09/09
- [elpa] master c8b8e11 19/38: js2-define-destruct-symbols: Speed up, theoretically, Dmitry Gutov, 2015/09/09
- [elpa] master a6f2a94 15/38: Allow plain parameters after default, Dmitry Gutov, 2015/09/09
- [elpa] master d0686a0 18/38: js2-define-destruct-symbols-internal: Remove, don't need it anymore, Dmitry Gutov, 2015/09/09
- [elpa] master f146f13 17/38: js2-define-destruct-symbols-internal: Stop growing NAME-NODES exponentially, Dmitry Gutov, 2015/09/09
- [elpa] master eba59c5 21/38: Added missing etags dependency, Dmitry Gutov, 2015/09/09
- [elpa] master 7184664 20/38: Add a jump to definition command bound to M-., Dmitry Gutov, 2015/09/09