Skip to content

Commit 3801694

Browse files
authored
Merge pull request #557 from emacs-php/fix/issue-553
Add defvar-local php-style-delete-trailing-whitespace
2 parents 369be83 + 5834268 commit 3801694

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

php-mode.el

+3-1
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,7 @@ this ^ lineup"
10101010
(cons "PHP" (c-lang-const c-mode-menu php)))
10111011

10121012
(defvar-local php-mode--delayed-set-style nil)
1013+
(defvar-local php-style-delete-trailing-whitespace nil)
10131014

10141015
(defun php-set-style (stylename &optional dont-override)
10151016
"Set the current `php-mode' buffer to use the style STYLENAME.
@@ -1064,7 +1065,8 @@ After setting the stylevars run hooks according to STYLENAME
10641065
(when php-mode--delayed-set-style
10651066
(let ((coding-style (or (and (boundp 'php-project-coding-style) php-project-coding-style)
10661067
php-mode-coding-style)))
1067-
(prog1 (php-set-style (symbol-name coding-style))
1068+
(prog1 (when coding-style
1069+
(php-set-style (symbol-name coding-style)))
10681070
(remove-hook 'hack-local-variables-hook #'php-mode-set-style-delay)))))
10691071

10701072
(defvar php-mode-syntax-table

0 commit comments

Comments
 (0)