Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hotfix] Fix lazy evaluation of php-set-style #444

Merged
merged 1 commit into from
Mar 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions php-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1202,10 +1202,11 @@ After setting the stylevars run hooks according to STYLENAME
;; Since it depends on the timing at which the file local variable is set.
;; File local variables are set after initialization of major mode except `run-hook' is complete.
(if php-mode-enable-project-coding-style
(add-hook 'hack-local-variables-hook #'php-mode-set-style-delay t t)
(setq php-mode--delayed-set-style t)
(when (fboundp 'advice-add)
(advice-add #'c-set-style :after #'php-mode--disable-delay-set-style '(local)))
(progn
(add-hook 'hack-local-variables-hook #'php-mode-set-style-delay t t)
(setq php-mode--delayed-set-style t)
(when (fboundp 'advice-add)
(advice-add #'c-set-style :after #'php-mode--disable-delay-set-style '(local))))
(php-set-style (symbol-name php-mode-coding-style)))

(when (or php-mode-force-pear
Expand Down