2013-08-14 22:28:11 +00:00
|
|
|
;; PHP Mode
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.php$" . php-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.inc$" . php-mode))
|
|
|
|
|
2013-09-25 01:34:30 +00:00
|
|
|
(defun my-php-mode-hook ()
|
|
|
|
"Customize PHP indentation"
|
|
|
|
|
|
|
|
(c-set-offset 'arglist-cont-nonempty 'c-lineup-arglist)
|
2013-10-22 15:08:42 +00:00
|
|
|
(c-set-offset 'substatement-open 0)
|
|
|
|
(c-set-offset 'case-label '+))
|
2013-09-25 01:34:30 +00:00
|
|
|
|
|
|
|
(add-hook 'php-mode-hook 'my-php-mode-hook)
|
|
|
|
|
2013-08-14 22:28:11 +00:00
|
|
|
;; Multi-Web-Mode
|
|
|
|
(require 'multi-web-mode)
|
|
|
|
(setq mweb-default-major-mode 'html-mode)
|
|
|
|
(setq mweb-tags '((php-mode "<\\?php\\|<\\? \\|<\\?=" "\\?>")
|
|
|
|
(js-mode "<script[^>]*>" "</script>")
|
|
|
|
(css-mode "<style[^>]*>" "</style>")))
|
2013-10-22 15:09:04 +00:00
|
|
|
(setq mweb-filename-extensions '("php" "htm" "html" "ctp" "phtml" "php4" "php5" "tpl"))
|
2013-08-14 22:28:11 +00:00
|
|
|
(multi-web-global-mode 1)
|