File tree Expand file tree Collapse file tree 3 files changed +20
-10
lines changed
Expand file tree Collapse file tree 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."
627627 ((assq 'defun-block-intro c-syntactic-context) nil )
628628 ((assq 'defun-close c-syntactic-context) nil )
629629 ((assq 'statement-cont c-syntactic-context) nil )
630- (t
631- (save-excursion
630+ ((save-excursion
632631 (beginning-of-line )
633632 (let ((beginning-of-langelem (cdr langelem))
634633 (beginning-of-current-line (point ))
@@ -651,8 +650,10 @@ but only if the setting is enabled."
651650 (skip-chars-backward " \r\n " )
652651 (backward-char 1 ))
653652 (and (not (eq (point ) beginning-of-current-line))
653+ (not (php-in-string-or-comment-p))
654654 (not (looking-at-p " ," ))
655- (not (php-in-string-or-comment-p))))
655+ (save-excursion
656+ (backward-char ) (not (looking-at-p " ," )))))
656657 '+ )
657658 (t nil )))))))
658659
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'."
644644 (goto-char (point-min ))
645645 (should (eq (php-mode-test-in-function-p nil ) nil ))))
646646
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.
653651 (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 )))
655655
656656(ert-deftest php-mode-test-php74 ()
657657 " Test highlighting language constructs added in PHP 7.4."
You can’t perform that action at this time.
0 commit comments