[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode b1d2820 309/405: Fixed issue with indentation
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode b1d2820 309/405: Fixed issue with indentation of square bracket arrays in assignments |
Date: |
Sat, 13 Jul 2019 10:00:38 -0400 (EDT) |
branch: externals/phps-mode
commit b1d28202e568ee61bd4d950bb99ee5073314b4f0
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Fixed issue with indentation of square bracket arrays in assignments
---
phps-mode-functions.el | 5 +++--
phps-mode-test-functions.el | 5 +++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/phps-mode-functions.el b/phps-mode-functions.el
index 41e7903..3f0fb68 100644
--- a/phps-mode-functions.el
+++ b/phps-mode-functions.el
@@ -464,7 +464,8 @@
(and (string= token ")")
(< round-bracket-level (car
in-assignment-round-bracket-level)))
(and (string= token ",")
- (= round-bracket-level (car
in-assignment-round-bracket-level)))
+ (= round-bracket-level (car
in-assignment-round-bracket-level))
+ (= square-bracket-level (car
in-assignment-square-bracket-level)))
(and (string= token"]")
(< square-bracket-level (car
in-assignment-square-bracket-level)))
(and (equal token 'T_FUNCTION)
@@ -473,7 +474,7 @@
;; NOTE Ending an assignment because of function token
is to support PSR-2 Closures
(when phps-mode-functions-verbose
- (message "Ended assignment"))
+ (message "Ended assignment at %s" token))
(pop in-assignment-square-bracket-level)
(pop in-assignment-round-bracket-level)
(unless in-assignment-round-bracket-level
diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index 8ec1b0b..0cca066 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -182,6 +182,11 @@
"Concatenated echo string with function call"
(should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (2 0)) (5 (1 0)) (6 (1
0)) (7 (0 0))) (phps-mode-test-hash-to-list
(phps-mode-functions-get-lines-indent)))))
+ (phps-mode-test-with-buffer
+ "<?php\n$options = [\n 0 => [\n 'label' => __('No'),\n
'value' => 0,\n ],\n];"
+ "Assignment with square bracketed array"
+ (should (equal '((1 (0 0)) (2 (0 0)) (3 (1 0)) (4 (2 0)) (5 (2 0)) (6 (1
0)) (7 (0 0))) (phps-mode-test-hash-to-list
(phps-mode-functions-get-lines-indent)))))
+
)
(defun phps-mode-test-functions-get-lines-indent-psr-2 ()
- [elpa] externals/phps-mode 2ec6f6d 306/405: Fixed some compilation warnings, (continued)
- [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, 2019/07/13
- [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 <=
- [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
- [elpa] externals/phps-mode c2b8a16 335/405: Passes new test for concatenated string inside function arguments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode b4e416a 336/405: (comment-region) tests working with custom function, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode ad53b6c 330/405: Fixed warning when expected integer was nil, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c8c5b62 337/405: Made custom functions for (comment-region) and (uncomment-region), Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7e22fdb 323/405: Added failing incremental indentation test, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode a45b39a 339/405: Added two failing indentation tests for concatenated equal assignment and double arrow multi-line array declaration, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 3e1ff06 332/405: Added integration-tests for syntax colouring and update goals, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode ced201d 322/405: Updated syntax colouring for namespace, class, function and constant names, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 8298a6a 325/405: Colorized strings after namespace separator, Stefan Monnier, 2019/07/13