diff --git a/php-mode.el b/php-mode.el index 1ecbb46e..2216c01c 100644 --- a/php-mode.el +++ b/php-mode.el @@ -636,7 +636,7 @@ might be to handle switch and goto labels differently." (defun php-lineup-cascaded-calls (langelem) "Line up chained methods using `c-lineup-cascaded-calls', but only if the setting is enabled" - (if php-lineup-cascaded-calls + (when php-mode-lineup-cascaded-calls (c-lineup-cascaded-calls langelem))) (c-add-style @@ -661,6 +661,7 @@ but only if the setting is enabled" (tab-width . ,(default-value 'tab-width)) (fill-column . ,(default-value 'fill-column)) (show-trailing-whitespace . ,(default-value 'show-trailing-whitespace)) + (php-mode-lineup-cascaded-calls . t) (php-style-delete-trailing-whitespace . nil))) (defun php-enable-default-coding-style () @@ -687,6 +688,7 @@ but only if the setting is enabled" (tab-width . 2) (fill-column . 78) (show-trailing-whitespace . t) + (php-mode-lineup-cascaded-calls . nil) (php-style-delete-trailing-whitespace . t))) (defun php-enable-drupal-coding-style () @@ -713,6 +715,7 @@ but only if the setting is enabled" '("php" (c-offsets-alist . ((statement-cont . php-lineup-hanging-semicolon))) (c-indent-comments-syntactically-p . t) + (php-mode-lineup-cascaded-calls . nil) (fill-column . 78))) (defun php-enable-symfony2-coding-style () @@ -721,12 +724,13 @@ but only if the setting is enabled" (php-set-style "symfony2")) (c-add-style - "psr2" + "psr2" ; PSR-2 / PSR-12 '("php" (c-offsets-alist . ((statement-cont . +))) (c-indent-comments-syntactically-p . t) (fill-column . 78) (show-trailing-whitespace . t) + (php-mode-lineup-cascaded-calls . nil) (php-style-delete-trailing-whitespace . t))) (defun php-enable-psr2-coding-style ()