emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/typescript-mode d223ae40e3 1/3: style: fix whitespace


From: ELPA Syncer
Subject: [nongnu] elpa/typescript-mode d223ae40e3 1/3: style: fix whitespace
Date: Sun, 3 Jul 2022 06:58:54 -0400 (EDT)

branch: elpa/typescript-mode
commit d223ae40e32f4ce7de79f6e20636b53aa86f35e1
Author: Matus Goljer <matus.goljer@gmail.com>
Commit: Matus Goljer <matus.goljer@gmail.com>

    style: fix whitespace
---
 typescript-mode.el | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/typescript-mode.el b/typescript-mode.el
index 830d79dc9e..d419890aff 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -2094,7 +2094,7 @@ This performs fontification according to 
`typescript--class-styles'."
     ;; but need care to avoid affecting the // and */ comment markers.
     ("\\(?:^\\|[=([{,:;|&!]\\|\\_<return\\_>\\)\\(?:[ \t]\\)*\\(/\\)[^/*]"
      (1 (ignore
-        (forward-char -1)
+     (forward-char -1)
          (when (or (not (memq (char-after (match-beginning 0)) '(?\s ?\t)))
                    ;; If the / is at the beginning of line, we have to check
                    ;; the end of the previous text.
@@ -2330,20 +2330,20 @@ the same column as the current line."
   (save-excursion
     (save-match-data
       (when (looking-at "\\s-*\\_<while\\_>")
-       (if (save-excursion
-             (skip-chars-backward "[ \t\n]*}")
-             (looking-at "[ \t\n]*}"))
-           (save-excursion
-             (backward-list) (forward-symbol -1) (looking-at "\\_<do\\_>"))
-         (typescript--re-search-backward "\\_<do\\_>" (point-at-bol) t)
-         (or (looking-at "\\_<do\\_>")
-             (let ((saved-indent (current-indentation)))
-               (while (and (typescript--re-search-backward "^\\s-*\\_<" nil t)
-                           (/= (current-indentation) saved-indent)))
-               (and (looking-at "\\s-*\\_<do\\_>")
-                    (not (typescript--re-search-forward
-                          "\\_<while\\_>" (point-at-eol) t))
-                    (= (current-indentation) saved-indent)))))))))
+    (if (save-excursion
+          (skip-chars-backward "[ \t\n]*}")
+          (looking-at "[ \t\n]*}"))
+        (save-excursion
+          (backward-list) (forward-symbol -1) (looking-at "\\_<do\\_>"))
+      (typescript--re-search-backward "\\_<do\\_>" (point-at-bol) t)
+      (or (looking-at "\\_<do\\_>")
+          (let ((saved-indent (current-indentation)))
+        (while (and (typescript--re-search-backward "^\\s-*\\_<" nil t)
+                (/= (current-indentation) saved-indent)))
+        (and (looking-at "\\s-*\\_<do\\_>")
+             (not (typescript--re-search-forward
+               "\\_<while\\_>" (point-at-eol) t))
+             (= (current-indentation) saved-indent)))))))))
 
 
 (defun typescript--ctrl-statement-indentation ()
@@ -2952,9 +2952,9 @@ Key bindings:
         comment-start-skip "\\(//+\\|/\\*+\\)\\s *")
 
   (setq-local electric-indent-chars
-             (append "{}():;," electric-indent-chars))
+          (append "{}():;," electric-indent-chars))
   (setq-local electric-layout-rules
-             '((?\; . after) (?\{ . after) (?\} . before)))
+          '((?\; . after) (?\{ . after) (?\} . before)))
 
   (let ((c-buffer-is-cc-mode t))
     ;; FIXME: These are normally set by `c-basic-common-init'.  Should



reply via email to

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