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

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

[elpa] externals/phps-mode a8097b5b5e 147/212: Improved indentation on l


From: Christian Johansson
Subject: [elpa] externals/phps-mode a8097b5b5e 147/212: Improved indentation on line after equal operator in if condition list
Date: Wed, 26 Jan 2022 01:51:17 -0500 (EST)

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

    Improved indentation on line after equal operator in if condition list
---
 phps-mode-indent.el | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/phps-mode-indent.el b/phps-mode-indent.el
index 84c4574e39..e01934da15 100644
--- a/phps-mode-indent.el
+++ b/phps-mode-indent.el
@@ -425,9 +425,19 @@
 
                ;; $var = 'A line' .
                ;;     'something';
+               ;; or
+               ;; $var .= 'A line' .
+               ;;     'something'
+               ;; or
+               ;; $var += 35 +
+               ;;     77
+               ;; but ignore
+               ;; $var === true
+               ;; or
+               ;; $var == 3
                ((and
                  (string-match-p
-                  "^[\t ]*$[a-zA-Z0-9_]+[\t ]*="
+                  "^[\t ]*$[a-zA-Z0-9_]+[\t ]*[^=]*=\\($\\|[\t ]+\\)"
                   previous-line-string)
                  (not
                   (string-match-p
@@ -1496,6 +1506,11 @@
                  new-indentation
                  (+ new-indentation tab-width)))
 
+               ;; ) {
+               ;;     echo 'here'
+               ;; or
+               ;; ][
+               ;;     25
                ((and (= previous-bracket-level 0)
                      previous-line-starts-with-closing-bracket)
                 (setq



reply via email to

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