# HG changeset patch # User Oleksandr Gavenko # Date 1396523393 -10800 # Node ID 33ab3ce7f973a6f6c48d0618e2fa44309596950c # Parent dec4b1d47f61d5878a96616bb0e8d7f9cd8cf3c0 Use original values of web-mode-engine-file-regexps. Enable PHP mode. diff -r dec4b1d47f61 -r 33ab3ce7f973 .emacs-my --- a/.emacs-my Thu Apr 03 12:59:06 2014 +0300 +++ b/.emacs-my Thu Apr 03 14:09:53 2014 +0300 @@ -2705,10 +2705,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (message "web-mode") -(setq web-mode-engine-file-regexps - '(("jsp" . "\\.tagf?\\'") - ("jsp" . "\\.jspf?\\'"))) - (setq web-mode-markup-indent-offset 2 web-mode-css-indent-offset 2 web-mode-code-indent-offset 2 @@ -2719,12 +2715,17 @@ (ignore-errors (require 'web-mode)) (when (featurep 'web-mode) + (setq web-mode-engine-file-regexps (delq (assoc "jsp" web-mode-engine-file-regexps) web-mode-engine-file-regexps)) + (mapc (lambda (i) (add-to-list 'web-mode-engine-file-regexps i)) + '(("jsp" . "\\.tagf?\\'") + ("jsp" . "\\.jspf?\\'"))) (add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.jspf?\\'" . web-mode)) (add-to-list 'auto-mode-alist '("/WEB-INF/tags/.*\\.tagf?\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.php\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) )