File tree 3 files changed +20
-10
lines changed
3 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -627,8 +627,7 @@ but only if the setting is enabled."
627
627
((assq 'defun-block-intro c-syntactic-context) nil )
628
628
((assq 'defun-close c-syntactic-context) nil )
629
629
((assq 'statement-cont c-syntactic-context) nil )
630
- (t
631
- (save-excursion
630
+ ((save-excursion
632
631
(beginning-of-line )
633
632
(let ((beginning-of-langelem (cdr langelem))
634
633
(beginning-of-current-line (point ))
@@ -651,8 +650,10 @@ but only if the setting is enabled."
651
650
(skip-chars-backward " \r\n " )
652
651
(backward-char 1 ))
653
652
(and (not (eq (point ) beginning-of-current-line))
653
+ (not (php-in-string-or-comment-p))
654
654
(not (looking-at-p " ," ))
655
- (not (php-in-string-or-comment-p))))
655
+ (save-excursion
656
+ (backward-char ) (not (looking-at-p " ," )))))
656
657
'+ )
657
658
(t nil )))))))
658
659
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ return [
4
+ 'foo ' => 1 , // ###php-mode-test### ((indent 4))
5
+ 'bar ' => 2 ,
6
+
7
+ 'buz ' => 3 , // ###php-mode-test### ((indent 4))
8
+ 'buzbuz ' => 4 , // ###php-mode-test### ((indent 4))
9
+ ];
Original file line number Diff line number Diff line change @@ -644,14 +644,14 @@ Meant for `php-mode-test-issue-503'."
644
644
(goto-char (point-min ))
645
645
(should (eq (php-mode-test-in-function-p nil ) nil ))))
646
646
647
- (ert-deftest php-mode-test-issue-623 ()
648
- " Proper alignment object -> accessor."
649
- (with-php-mode-test (" indent/issue-623.php" :indent t :magic t )))
650
-
651
- (ert-deftest php-mode-test-issue-702 ()
652
- " Proper alignment arglist."
647
+ (ert-deftest php-mode-test-indentation-issues ()
648
+ ; ; Proper alignment object -> accessor.
649
+ (with-php-mode-test (" indent/issue-623.php" :indent t :magic t ))
650
+ ; ; Proper alignment arglist.
653
651
(with-php-mode-test (" indent/issue-702.php" :indent t :magic t ))
654
- (with-php-mode-test (" indent/issue-726.php" :indent t :magic t )))
652
+ (with-php-mode-test (" indent/issue-726.php" :indent t :magic t ))
653
+ ; ; Proper alignment arglist that contains empty lines.
654
+ (with-php-mode-test (" indent/issue-793.php" :indent t :magic t )))
655
655
656
656
(ert-deftest php-mode-test-php74 ()
657
657
" Test highlighting language constructs added in PHP 7.4."
You can’t perform that action at this time.
0 commit comments