Skip to content

Commit 4b1c80f

Browse files
committed
[Hotfix] Fix lazy evaluation of php-set-style
Statements were not bundled by progn. This bug was caused by #442.
1 parent 398d1ea commit 4b1c80f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

php-mode.el

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,10 +1202,11 @@ After setting the stylevars run hooks according to STYLENAME
12021202
;; Since it depends on the timing at which the file local variable is set.
12031203
;; File local variables are set after initialization of major mode except `run-hook' is complete.
12041204
(if php-mode-enable-project-coding-style
1205-
(add-hook 'hack-local-variables-hook #'php-mode-set-style-delay t t)
1206-
(setq php-mode--delayed-set-style t)
1207-
(when (fboundp 'advice-add)
1208-
(advice-add #'c-set-style :after #'php-mode--disable-delay-set-style '(local)))
1205+
(progn
1206+
(add-hook 'hack-local-variables-hook #'php-mode-set-style-delay t t)
1207+
(setq php-mode--delayed-set-style t)
1208+
(when (fboundp 'advice-add)
1209+
(advice-add #'c-set-style :after #'php-mode--disable-delay-set-style '(local))))
12091210
(php-set-style (symbol-name php-mode-coding-style)))
12101211

12111212
(when (or php-mode-force-pear

0 commit comments

Comments
 (0)