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

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

[elpa] externals/phps-mode 4f20de353e 109/212: Passed indent tests for P


From: Christian Johansson
Subject: [elpa] externals/phps-mode 4f20de353e 109/212: Passed indent tests for PSR-2
Date: Wed, 26 Jan 2022 01:51:08 -0500 (EST)

branch: externals/phps-mode
commit 4f20de353e40aff1a7231604672d162eeded3029
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>

    Passed indent tests for PSR-2
---
 phps-mode-indent.el | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/phps-mode-indent.el b/phps-mode-indent.el
index 22759692ea..6504cff378 100644
--- a/phps-mode-indent.el
+++ b/phps-mode-indent.el
@@ -553,13 +553,18 @@
               ;; or
               ;; default;
               ;;     echo 'here';
-              (when (or
-                     (string-match-p
-                      "^[\t ]*case[\t ]+.*\\(;\\|:\\)[\t ]*$"
-                      previous-line-string)
-                     (string-match-p
-                      "^[\t ]*default.*\\(;\\|:\\)[\t ]*$"
-                      previous-line-string))
+              (when (and
+                     (not
+                      (string-match-p
+                       "^[\t ]*\\(case[\t ]+\\|default\\)"
+                       current-line-string))
+                     (or
+                      (string-match-p
+                       "^[\t ]*case[\t ]+.*\\(;\\|:\\)[\t ]*$"
+                       previous-line-string)
+                      (string-match-p
+                       "^[\t ]*default.*\\(;\\|:\\)[\t ]*$"
+                       previous-line-string)))
                 (setq
                  previous-bracket-level
                  (+ previous-bracket-level tab-width)))



reply via email to

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