Skip to content

Commit 2db01f5

Browse files
committed
Fix regexp and use when clause instead of if
1 parent cce786c commit 2db01f5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

php-mode.el

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,11 +1192,10 @@ After setting the stylevars run hooks according to STYLENAME
11921192

11931193
(php-set-style (symbol-name php-mode-coding-style))
11941194

1195-
(if (or php-mode-force-pear
1196-
(and (stringp buffer-file-name)
1197-
(string-match "PEAR\\|pear"
1198-
(buffer-file-name))
1199-
(string-match "\\.php$" (buffer-file-name))))
1195+
(when (or php-mode-force-pear
1196+
(and (stringp buffer-file-name)
1197+
(string-match "PEAR\\|pear" buffer-file-name)
1198+
(string-match "\\.php\\'" buffer-file-name)))
12001199
(php-set-style "pear"))
12011200

12021201
(setq indent-line-function 'php-cautious-indent-line)

0 commit comments

Comments
 (0)