[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode df91b8e433 117/212: More handling of string-d
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode df91b8e433 117/212: More handling of string-doc indentation |
Date: |
Wed, 26 Jan 2022 01:51:09 -0500 (EST) |
branch: externals/phps-mode
commit df91b8e43315a9a2c42901ce6fb30d4d0617e619
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
More handling of string-doc indentation
---
phps-mode-indent.el | 30 ++++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)
diff --git a/phps-mode-indent.el b/phps-mode-indent.el
index 2a39eb9df4..8a6cc8ff27 100644
--- a/phps-mode-indent.el
+++ b/phps-mode-indent.el
@@ -245,12 +245,13 @@
previous-indentation)
(goto-char point)
- ;; (message "\ncurrent-line-string: %S" current-line-string)
- ;; (message "previous-line-string: %S" previous-line-string)
- ;; (message "current-line-starts-with-closing-bracket: %S"
current-line-starts-with-closing-bracket)
- ;; (message "previous-line-ends-with-opening-bracket: %S"
previous-line-ends-with-opening-bracket)
- ;; (message "previous-bracket-level: %S" previous-bracket-level)
- ;; (message "previous-indentation: %S" previous-indentation)
+ (message "\ncurrent-line-string: %S" current-line-string)
+ (message "previous-line-string: %S" previous-line-string)
+ (message "current-line-starts-with-closing-bracket: %S"
current-line-starts-with-closing-bracket)
+ (message "current-line-starts-with-opening-bracket: %S"
current-line-starts-with-opening-bracket)
+ (message "previous-line-ends-with-opening-bracket: %S"
previous-line-ends-with-opening-bracket)
+ (message "previous-bracket-level: %S" previous-bracket-level)
+ (message "previous-indentation: %S" previous-indentation)
;; Case by case logic below - most specific to most general
@@ -295,11 +296,18 @@
;; myInterface,
;; myInterface2
;; {
+ ;; ignore case
+ ;; class MyClass implements myInterface, myInterface2
+ ;; {
((and
current-line-starts-with-opening-bracket
(string= current-line-starts-with-opening-bracket "{")
(phps-mode-indent--backwards-looking-at
- "[\r\t ]*implements[\r\t ]+\\([\r\t
]*[\\a-zA-Z_0-9]+,?\\)+[\r\t ]*{$"))
+ "[\r\t ]*implements[\r\t ]+\\([\r\t
]*[\\a-zA-Z_0-9]+,?\\)+[\r\t ]*{$")
+ (not
+ (string-match-p
+ "[\t ]*\\(class\\|interface\\)[\t ]+"
+ previous-line-string)))
(setq
new-indentation
(- new-indentation tab-width)))
@@ -903,9 +911,15 @@
;; or
;; array(
;; )
+ ;; but ignore
+ ;; var_dump(array(<<<EOD
+ ;; ölöas
+ ;; EOD
+ ;; ));
((and
current-line-starts-with-closing-bracket
- (not previous-line-ends-with-opening-bracket))
+ (not previous-line-ends-with-opening-bracket)
+ (>= previous-indentation tab-width))
(setq
new-indentation
(- new-indentation tab-width)))
- [elpa] externals/phps-mode 4e021b8413 046/212: Bookkeeping via AST now passing method calls, (continued)
- [elpa] externals/phps-mode 4e021b8413 046/212: Bookkeeping via AST now passing method calls, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 712f5e9f2b 049/212: Removed invalid syntax code from old bookkeeping test, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 1dc3b453c9 043/212: Passed bookkeeping via AST for try catch blocks, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 882e6f75dc 062/212: Work on SDT for interface methods, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 30e9fa14ff 075/212: Added a failing bookkeeping test, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 16ce2acfb7 077/212: Removed debug output for bookkeeping, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode bc5039e32f 086/212: Created custom determine string indentation function, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode daff4ad5e0 085/212: More work on indentation, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode b82475c697 090/212: Passed token-blind indentation for multi-line class extends and implements, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 2ea2360c3e 091/212: Created indent helper functions, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode df91b8e433 117/212: More handling of string-doc indentation,
Christian Johansson <=
- [elpa] externals/phps-mode 6fac0d5585 102/212: Passed indent test for heredoc string, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 1af63142f3 127/212: Fixed incremental issue with new SDT based bookkeeping, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 3565c7efb3 125/212: Fixed byte-compilation warnings for indent file, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode a8097b5b5e 147/212: Improved indentation on line after equal operator in if condition list, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode dece7f242e 160/212: Added more failing indentation tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode a530988fe0 134/212: Added more failing indent tests, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 8c1f529f87 145/212: Passing indent for line after ending of statement / expression with trailing closing bracket, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode d7aa22d251 146/212: Added two new failing tests for indentation, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode c453932f32 139/212: Added TODO item, Christian Johansson, 2022/01/26
- [elpa] externals/phps-mode 8374026917 166/212: Improved indentation on lines starting with a closing square bracket, Christian Johansson, 2022/01/26