unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Highlighting jsp code in mmm-mode
@ 2005-03-17 20:56 Ryan Bowman
  0 siblings, 0 replies; only message in thread
From: Ryan Bowman @ 2005-03-17 20:56 UTC (permalink / raw)


I am trying to use mmm-mode to edit jsp files with
html-helper-mode and jde-mode.  I have setup mmm-mode
as shown below (which I got from the wiki page
http://emacswiki.org/cgi-bin/wiki/JspMode), however,
it doesn't seem to work as I expect.  When I open .php
files block starting with <? or <% are highlighted
with a face change, but when I open .jsp files <% code
is not highlighted, dispite the modeline indication
that MMM is running.
Any suggestions?
(If its relevant: Emacs 21.3.50.1 on WinXP Pro)


(require 'mmm-mode)
(setq mmm-global-mode 'maybe)

;; set up an mmm group for fancy html editing
(mmm-add-group
 'fancy-html
 '(
   (html-php-tagged
    :submode php-mode
    :face mmm-code-submode-face
    :front "<[?]php"
    :back "[?]>")

   (jsp-code
    :submode java
    :match-face (("<%!" .
mmm-declaration-submode-face)
    		 ("<%=" . mmm-output-submode-face)
    		 ("<%"  . mmm-code-submode-face))
    :front "<%[!=]?"
    :back "%>"
    :insert ((?% jsp-code nil @ "<%" @ " " _ " " @
"%>" @)
    	     (?! jsp-declaration nil @ "<%!" @ " " _ " "
@ "%>" @)
    	     (?= jsp-expression nil @ "<%=" @ " " _ " " @
"%>" @))
    )
   
   (jsp-directive
    :submode java
    :face mmm-special-submode-face
    :front "<%@"
    :back "%>"
    :insert ((?@ jsp-directive nil @ "<%@" @ " " _ " "
@ "%>" @))
    )

   ))

;; What features should be turned on in this
html-mode?
(add-to-list 'mmm-mode-ext-classes-alist
'(html-helper-mode nil fancy-html))
(mmm-add-mode-ext-class nil "\\.jsp\\'" 'fancy-html)
(add-to-list 'auto-mode-alist '("\\.jsp\\'" . html-helper-mode))

----
Ryan Bowman

That stupid bird stole my quarter.  I hate birds. - Eddie
----

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-17 20:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-17 20:56 Highlighting jsp code in mmm-mode Ryan Bowman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).