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

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

Re: [h-e-w] php/html-helper with mmm mode


From: Galen Boyer
Subject: Re: [h-e-w] php/html-helper with mmm mode
Date: 02 Jul 2002 00:07:23 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

On Fri, 28 Jun 2002, address@hidden wrote:
> I got the following from the help list for mmm mode which does almost
> exactly the opposite of what I want... I would like to have
> html-helper-mode be the main mode with php-mode as the submode...
> 
> (require 'php-mode)
> (require 'mmm-auto)
> (mmm-add-classes
> '((html-in-php
>:submode html-mode
>:front "\\?>"
>:back "<\\?")))
> (add-hook 'php-mode-hook '(lambda ()
> (setq mmm-classes '(html-in-php))
> (set-face-background 'mmm-default-submode-face "LightBlue1")
> (mmm-mode-on)))
> (provide 'mmm-php)
> 
> I tried revising like the following, but ended up with PHP as major
> and submode too?

I have this for a psgml major and sql minor.  

    (require 'mmm-mode)
    (mmm-add-group 'xsql
     '((xsql-sql
        :submode sql-mode
        :front "<xsql:query\[^>\]*>"
        :back "</xsql:query"
        )))

    (add-to-list 'auto-mode-alist '("\\.xsql\\'" . sgml-mode))

Try setting the major mode of your .php files to html-helper.
(add-to-list 'auto-mode-alist '("\\.php\\'" . html-helper-mode))

Then, adding the submode.  Something like this might work, but untested.

(mmm-add-group 'php
  '((php
     :submode php-mode
     :front "\\?>"
     :back  "<\\?")))





reply via email to

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