Found the following factors affect speed of this pseudo jsp-mode:
The machine of course.
Size of jsp file being parsed, especially if font-lock (colorize mode)
is on - as if you'd want it off. Consider it incentive to keep the
jsp files short and abstract more of your logic out of the
presentation where it might not belong anyway. Besides abstracting
into objects you could use jsp includes depending on which jsp version
you're up to. I've found people tend to script too much on a page,
but at the same time architecture should not be directed for sake of
the editor.
Faster after initial switch as jde.el and sgml-mode.el might not have
been loaded.
Using lighter weight modes for both the java and html modes, for
instance java-mode instead of jde-mode. But who wants to give up jde?
It can be tolerable, even though the mode switching can be a bit of a
distraction as well. Hoping for something better too, but beats
nothing.
>Kinda slow switching between modes but very interesting idea... and much
>better than what I had before. Thanks for the info!
>
>john
>
>
>Ted Guild wrote:
>>
>> An interesting way to do JSP, basically it switches to the proper mode
>> depending on where the point is.
>>
>> Obtain multi-mode.el from
>>
>> ftp://archive.cis.ohio-state.edu/pub/emacs-lisp/misc/
>>
>> Put this into your .emacs
>> **Note you can use your prefered modes for both html and java
>>
>> ;;multi-mode
>> (autoload 'multi-mode
>> "multi-mode"
>> "Allowing multiple major modes in a buffer."
>> t)
>>
>> (defun jsp-mode () (interactive)
>> (multi-mode 1
>> 'html-mode
>> ;;'("<%" java-mode)
>> '("<%" jde-mode)
>> '("%>" html-mode)))
>>
>> (setq auto-mode-alist
>> (cons '("\\.jsp$" . jsp-mode)
>> auto-mode-alist))
>>
>> --
>> Ted Guild
>> Software Developer
>> http://www.guilds.net
>> [EMAIL PROTECTED]
--
Ted Guild
Software Developer
http://www.guilds.net
[EMAIL PROTECTED]