[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 502a42b5c0 205/212: Improved indentation arou
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode 502a42b5c0 205/212: Improved indentation around doc-comments |
Date: |
Wed, 26 Jan 2022 01:51:27 -0500 (EST) |
branch: externals/phps-mode
commit 502a42b5c0cd59d6913f06fb6e0bd4bfcd4822fe
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Improved indentation around doc-comments
---
phps-mode-indent.el | 63 +++++++++++++++++++++++++++++++++--------------------
1 file changed, 39 insertions(+), 24 deletions(-)
diff --git a/phps-mode-indent.el b/phps-mode-indent.el
index cf1387940f..a00d7b65d9 100644
--- a/phps-mode-indent.el
+++ b/phps-mode-indent.el
@@ -1078,6 +1078,45 @@
new-indentation
(- new-indentation tab-width)))
+ ;; LINE AFTER STARTING DOC-COMMENT
+ ;; /**
+ ;; *
+ ((= previous-bracket-level 1)
+ (setq
+ match-type
+ 'line-after-opening-doc-comment)
+ (setq
+ new-indentation
+ (+ new-indentation 1)))
+
+ ;; LINE AFTER ENDING OF DOC-COMMENT
+ ;; /**
+ ;; *
+ ;; */
+ ;; echo 'here';
+ ((= previous-bracket-level -1)
+ (setq
+ match-type
+ 'line-after-ending-of-doc-comment)
+ (setq
+ new-indentation
+ (1- new-indentation)))
+
+ ;; LINE AFTER CONTINUATION OF DOC-COMMENT
+ ;; /**
+ ;; * here
+ ;; * there
+ ((and
+ (string-match-p
+ "^[\t ]*\\*"
+ previous-line-string)
+ (string-match-p
+ "^[\t ]*/?\\*"
+ previous2-line-string))
+ (setq
+ match-type
+ 'line-after-continuation-of-doc-comment))
+
;; LINE AFTER LINE ENDING WITH COMMA
;; return array(
;; '' => __(
@@ -1220,30 +1259,6 @@
new-indentation
(+ new-indentation tab-width)))
- ;; LINE AFTER ENDING OF DOC-COMMENT
- ;; /**
- ;; *
- ;; */
- ;; echo 'here';
- ((= previous-bracket-level -1)
- (setq
- match-type
- 'line-after-ending-of-doc-comment)
- (setq
- new-indentation
- (1- new-indentation)))
-
- ;; LINE AFTER STARTING DOC-COMMENT
- ;; /**
- ;; *
- ((= previous-bracket-level 1)
- (setq
- match-type
- 'line-after-opening-doc-comment)
- (setq
- new-indentation
- (+ new-indentation 1)))
-
;; LINE AFTER LINE THAT ENDS AND STARTS A BRACKET BLOCK
;; ) {
;; echo 'here'
- [elpa] externals/phps-mode c05d97fc31 182/212: Disabled debug-mode in this branch, (continued)
- [elpa] externals/phps-mode c05d97fc31 182/212: Disabled debug-mode in this branch, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode d095e757e6 186/212: Added failing imenu test, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 2dc9280bcd 185/212: More work, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 87974abfcc 190/212: Improved indentation after lines containing => symbol, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode e049853a6f 193/212: Remove use of lex-analyzer from semantic and instead use custom, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 0e3889a122 202/212: Added indentation support for HTML/XML, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode d85974c2aa 196/212: Improved indentation inside multi-dimensional arrays, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 057aadd2f6 197/212: Improved indentation around multi-line logical expressions, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 5273bdf42f 206/212: Started on cache feature, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode d19bd439cf 198/212: Updated TODO items, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 502a42b5c0 205/212: Improved indentation around doc-comments,
Christian Johansson <=
- [elpa] externals/phps-mode 198cfbd360 199/212: Added failing indentation tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode af263a5462 200/212: Improved indentation detection of start of alternative control structure, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 5ae4886f14 212/212: Updated docs and version, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode fe83e986c7 192/212: Fixed issue with optimized lexer after byte-compilation, Christian Johansson, 2022/01/26