# HG changeset patch # User Oleksandr Gavenko # Date 1363295134 -7200 # Node ID ce279dbcf88075eb224276bd63794f628f65704f # Parent 3d524b2cbbc1feccf1b46c9be669a4de68235ab9 Use 'web-mode' if available. diff -r 3d524b2cbbc1 -r ce279dbcf880 .emacs-my --- a/.emacs-my Sat Feb 16 23:38:46 2013 +0200 +++ b/.emacs-my Thu Mar 14 23:05:34 2013 +0200 @@ -2500,6 +2500,20 @@ (eval-after-load 'rng-loc '(add-to-list 'rng-schema-locating-files "~/.emacs.d/rnc/schemas.xml")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(message "web-mode") + +(ignore-errors (require 'web-mode)) +(when (featurep 'web-mode) + (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 '("\\.jsp\\'" . 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 '("\\.mustache\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode)) + (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) ) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (message "psgml") (setq my-html-template @@ -2546,7 +2560,8 @@ ("--%\\(>\\)" (1 "> b")))) (setcdr (assoc 'font-lock-syntactic-keywords font-lock-defaults) 'jsp-font-lock-syntactic-keywords) ) -(add-to-list 'auto-mode-alist '("\\.jspf?\\'" . jsp-mode)) +(unless (featurep 'web-mode) + (add-to-list 'auto-mode-alist '("\\.jspf?\\'" . jsp-mode))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (message "sh, bash")