help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

php mode sub-region in mmm-mode


From: Stefan Horomnea
Subject: php mode sub-region in mmm-mode
Date: Fri, 05 May 2006 12:14:56 +0300
User-agent: Thunderbird 1.5.0.2 (X11/20060420)

Hello,

In my quest to make emacs a webdev environment I followed the exact instructions from this link: http://www.dzr-web.com/people/darren/projects/emacs-webdev/ which basically explains how to put together html-mode, sgml-mode, css-mode, php-mode and mmm-mode so you can web dev with emacs. It worked, but, as always there are more things to be customized :) . A thing that is really important to me, is that emacs doesn't recognize the php areas delimited with <?php ?> tags on the same line, or delimited with <?=?> in a document that has php, html and javascript .

So, this works:

some html here
<?php
$var = 1;
?>
other html here


This doesn't work:

some html here
<? if ($var == 1) { // this is not colored well so i guess not recognized as the php mode ?>
some html
<? }  // this neiter ?>

This also doesn't work:

some html <?=$var?> other html.

Maybe the key to it is this setting in .emacs file:

;; Set up an mmm group for fancy html editing
(mmm-add-group
'fancy-html
'(
        (html-php-embedded
               :submode php-mode
               :face mmm-output-submode-face
               :front "<[?]php"
               :back "[?]>")
.... etc

How can I make to be colored the <? ?> code if the begining and end php tags are on the same line, or for short echo syntax like <?=?>

Thank you.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]