[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode f2fe751 302/405: More work on trying to get P
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode f2fe751 302/405: More work on trying to get PSR-2 indentation working |
Date: |
Sat, 13 Jul 2019 10:00:37 -0400 (EDT) |
branch: externals/phps-mode
commit f2fe7514954de0dc3ae5dff19bc6742521d60bba
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
More work on trying to get PSR-2 indentation working
---
phps-mode-functions.el | 8 +++-----
phps-mode-test-functions.el | 2 +-
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/phps-mode-functions.el b/phps-mode-functions.el
index 54fd7e7..54f1fa4 100644
--- a/phps-mode-functions.el
+++ b/phps-mode-functions.el
@@ -466,11 +466,9 @@
(and (string= token ",")
(= round-bracket-level (car
in-assignment-round-bracket-level)))
(and (string= token"]")
- (<= square-bracket-level (car
in-assignment-square-bracket-level))))
+ (< square-bracket-level (car
in-assignment-square-bracket-level))))
(when phps-mode-functions-verbose
(message "Ended assignment"))
- (when first-token-on-line
- )
(pop in-assignment-square-bracket-level)
(pop in-assignment-round-bracket-level)
(unless in-assignment-round-bracket-level
@@ -485,8 +483,6 @@
(push square-bracket-level
in-assignment-square-bracket-level)
(setq in-assignment-level (1+ in-assignment-level))))
- ;; TODO Fix issue with indentation for assignments with
chained object operators
-
;; Keep track of object operators
(when (and (equal token 'T_OBJECT_OPERATOR)
first-token-on-line))
@@ -529,6 +525,8 @@
(when (and nesting-stack
(<= nesting-end (car (car nesting-stack))))
+ ;; TODO Handle case were nesting has decreased less than
next as well
+
(when phps-mode-functions-verbose
(message "\nPopping %s from nesting-stack since %s is
lesser or equal to %s, next value is: %s\n" (car nesting-stack) nesting-end
(car (car nesting-stack)) (nth 1 nesting-stack))
)
diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index 10d6b5a..02f674d 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -774,7 +774,7 @@
(defun phps-mode-test-functions ()
"Run test for functions."
;; (setq debug-on-error t)
- ;; (setq phps-mode-functions-verbose t)
+ (setq phps-mode-functions-verbose t)
(phps-mode-test-functions-get-lines-lindent-if)
(phps-mode-test-functions-get-lines-indent-classes)
(phps-mode-test-functions-get-lines-indent-inline-if)
- [elpa] externals/phps-mode cc77604 284/405: Fixed bug with indentation after switch case statements, (continued)
- [elpa] externals/phps-mode cc77604 284/405: Fixed bug with indentation after switch case statements, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode eeffdb2 315/405: Fixed trailing white-space, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 02b69f5 304/405: Tests for PSR-2 now passes with new algorithms, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b251a1e 314/405: Got unit tests for wrapping region in symbols working, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 20199b0 307/405: Added byte-compiled Lisp to gitignore, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a0b7695 316/405: Passes unit tests for integration with electric-pair, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7c3a31a 305/405: Fixed bug in indentation with stacked assignment closures, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 68422f5 301/405: Restored indentation test for PSR-2 closure, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f3766db 310/405: Fixed byte-compilation in lexer and integration-tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2ec6f6d 306/405: Fixed some compilation warnings, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f2fe751 302/405: More work on trying to get PSR-2 indentation working,
Stefan Monnier <=
- [elpa] externals/phps-mode 8eb3dc0 311/405: Fixed byte-compilation issue in lexer, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f77edf8 308/405: Updated compile command to ignore that files that doesn't compile, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 5d5ec06 313/405: Started on test for automatic quotations, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7e755e1 303/405: Fixed indentation for argument assignments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a852669 320/405: Fix bug in syntax colouring, added debug outputs for incremental lexer, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode ad94b0b 319/405: Removed some fixed TODO itemsc, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2427c7e 318/405: Improved README, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 6d834c1 312/405: Added support for (comment-region) and (uncomment-region), Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b1d2820 309/405: Fixed issue with indentation of square bracket arrays in assignments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 3bc2411 317/405: Moved syntax-table tests to own file, using local electric-pair-mode in PHPs buffers, Stefan Monnier, 2019/07/13