branch: externals/phps-mode
commit a8097b5b5e0b99392d941f9c807e855e4bdd63b9
Author: Christian Johansson <[email protected]>
Commit: Christian Johansson <[email protected]>
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