File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,12 @@ You can replace \"en\" with your ISO language code."
79
79
:group 'php
80
80
:type 'string )
81
81
82
+ (defcustom php-default-major-mode 'php-mode
83
+ " Major mode for edition PHP script."
84
+ :group 'php
85
+ :tag " PHP Default Major Mode"
86
+ :type 'function )
87
+
82
88
(defcustom php-template-mode-alist
83
89
'((" \\ .blade" . web-mode)
84
90
(" \\ .phpt\\ '" . phpt-mode)
@@ -198,18 +204,15 @@ Look at the `php-executable' variable instead of the constant \"php\" command."
198
204
'flymake-php-init )))))
199
205
(list php-executable (cdr init))))
200
206
201
- (eval-when-compile
202
- (declare-function php-mode " php-mode" ))
203
-
204
207
;;;### autoload
205
208
(defun php-mode-maybe ()
206
209
" Select PHP mode or other major mode."
207
210
(let ((mode (assoc-default buffer-file-name php-template-mode-alist #'string-match-p )))
208
211
(when (and mode (not (fboundp mode)))
209
212
(if (string-match-p " \\ .blade\\ ." buffer-file-name)
210
213
(warn " php-mode is NOT support blade template" )
211
- (setq mode # 'php-mode )))
212
- (funcall (or mode # ' php-mode ))))
214
+ (setq mode nil )))
215
+ (funcall (or mode php-default-major -mode))))
213
216
214
217
;;;### autoload
215
218
(defun php-current-class ()
You can’t perform that action at this time.
0 commit comments