Seems on-topic to me, I'm sure lots of JDE users are using JSP as well and
would like to have it supported one way or another.

My very primitive solution was to modify html-helper-mode. Sorry, I didn't
do it the right way with hooks, which is probably very simple if you know
how. Anyhow, I created a new face:

;;; JSP face
(defvar my-jsp-face (make-face 'my-jsp-face))
 (modify-face my-jsp-face "red" "grey" nil nil nil nil)

then added the following to html-helper-font-lock-keywords

 '("<%[^%]+%>" 0 my-jsp-face t )

So, at least my JSP code is set off from html. It would be nice if the java
was font-locked as well, but that quickly go over my head when I looked
into it, and besides there shouldn't be that much Java in your pages
anyhow.

Dave.



Eric Raymond wrote:

> Mark Mynsted wrote:
> >
> > What JSP font locking solutions are you folks using?
>
> We just use either java-mode or html-mode depending upon where in the
> JSP page we are editing.  I've looked around for something better, but
> haven't found it.  Sort of surprising.
>
> It would be great if there were a JSP mode that switched between these
> modes depending upon where the point was.
>
> Would love to hear what other people use to edit JSP. (Perhaps we can do
> this via email instead of the JDE lists - seems a bit off-topic for
> that?  I'm happy to collect peoples thoughts on this an post a summary
> to the jde list)

Reply via email to