Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 27439 invoked from network); 15 Oct 1999 01:50:52 -0000 Received: from dt045n2c.maine.rr.com (HELO domoi.guilds.net) (204.210.93.44) by apache.org with SMTP; 15 Oct 1999 01:50:52 -0000 Received: (from doma@localhost) by domoi.guilds.net (8.8.7/8.8.7) id VAA17253; Thu, 14 Oct 1999 21:50:48 -0400 Date: Thu, 14 Oct 1999 21:50:48 -0400 Message-Id: <199910150150.VAA17253@domoi.guilds.net> X-Authentication-Warning: domoi.guilds.net: doma set sender to ted@guilds.net using -f From: Ted Guild To: tomcat-dev@jakarta.apache.org Subject: Emacs JSP mode Reply-to: ted@guilds.net Anil, > 2. Emacs mode for JSP. (Beer's on me, if you're > interested!) Here's a quick and dirty way to get a jsp mode. Not much work involved, hardly worth a pint to toast emacs with. Basically it switches back and forth between the modes you choose to handle html and java appropriately as you traverse your page. The re-parsing for font-lock coloring as it switches modes can take a bit for real lengthy jsp pages (not good practice anyway as you should abstract the logic into objects), but otherwise is rather nice. Obtain multimode.el from one of the lisp archives and add it to your load path. ftp://archive.cis.ohio-state.edu/pub/emacs-lisp/misc/ and add this to your .emacs ;;multi-mode (autoload 'multi-mode "multi-mode" "Allowing multiple major modes in a buffer." t) (defun jsp-mode () (interactive) (multi-mode 1 'html-mode ;;your choice of modes for java and html ;;'("<%" 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 ted@guilds.net