Skip to content

Commit

Permalink
Add php-html-template-major-mode and php-blade-template-major-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
zonuexe committed May 26, 2019
1 parent 961a0c7 commit 9369cab
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions php.el
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,22 @@ You can replace \"en\" with your ISO language code."
:tag "PHP Default Major Mode"
:type 'function)

(defcustom php-html-template-major-mode 'web-mode
"Major mode for editing PHP-HTML template."
:group 'php
:tag "PHP-HTML Template Major Mode"
:type 'function)

(defcustom php-blade-template-major-mode 'web-mode
"Major mode for editing Blade template."
:group 'php
:tag "PHP Blade Template Major Mode"
:type 'function)

(defcustom php-template-mode-alist
'(("\\.blade" . web-mode)
("\\.phpt\\'" . phpt-mode)
("\\.phtml\\'" . web-mode))
`(("\\.blade" . ,php-blade-template-major-mode)
("\\.phpt\\'" . ,(if (fboundp 'phpt-mode) 'phpt-mode php-html-template-major-mode))
("\\.phtml\\'" . ,php-html-template-major-mode))
"Automatically use another MAJOR-MODE when open template file."
:group 'php
:tag "PHP Template Mode Alist"
Expand Down

0 comments on commit 9369cab

Please sign in to comment.