[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PHP+HTML with mmm-mode
From: |
ignat . skoryh |
Subject: |
PHP+HTML with mmm-mode |
Date: |
Mon, 20 Aug 2007 10:54:51 -0000 |
User-agent: |
G2/1.0 |
I'm trying to setup my emacs to edit PHP code with mmm-mode. I was
able to make it switch to different major modes (html and php
accordingly), but it fails to highlight embedded php code correctly,
as you can see on the screenshot:
http://www.javaparts.com/dst/emacs-html-php-mode.png.
As you can see mmm-mode adds background color around php regions, but
inside those regions keywords (e.g. if) are not highlighted. What am I
doing wrong?
Here is my .emacs initialization:
;; Use HTML mode for php files
(add-to-list 'auto-mode-alist '("\\.php$" . html-mode))
;; Load MMM
(require 'mmm-mode)
(setq mmm-global-mode 'maybe)
(setq mmm-submode-decoration-level 2)
(set-face-background 'mmm-code-submode-face "gray15")
(mmm-add-classes
'((php-in-html
:submode php-mode
:face mmm-code-submode-face
:front "<\\?\\(php=?\\)?"
:back "\\?>"
:include-front t
:include-back t)))
(mmm-add-mode-ext-class 'html-mode "\\.php$" 'php-in-html)
;; Colors
(global-font-lock-mode t)
Thanks!
- PHP+HTML with mmm-mode,
ignat . skoryh <=