Stephen Bardsley wrote:
> Greetings:
> 
> I use one of two options:  cperl-mode or html-helper-mode
> depending on how much perl vs. html I am editing.
> I think these modes are included in the current
> distribution of emacs, but don't hold me to it.
> 

Having you looked at mixing the modes using MMM in Emacs?
Check out the distribution editors/mmm-asp-perl.el file
for how I set it up.  You can get mmm-mode from here:

   http://mmm-mode.sourceforge.net/

It has its limitations, but it does seem to work better
for me than what you are doing, which is what I did for
years before.

For convenience, I have copied the mmm-asp-perl.el file
contents below:

;;; Apache::ASP mmm-mode config, by Joshua Chamas, 6/17/2001
(require 'mmm-auto)
(require 'mmm-compat)
(require 'mmm-vars)
(setq mmm-global-mode 'maybe)

; sets meta-p to reparse buffer in case the buffer does
; no update automatically while typing
(global-set-key "\M-p"  'mmm-parse-buffer)

;; create asp-perl mmm-mode subclass
(mmm-add-group 'asp-perl '((asp-perl-blocks
                             :submode perl-mode
                             :match-face (("<%" . mmm-code-submode-face)
                                          ("<%=" . mmm-output-submode_face))
                             :front "<%=?"
                             :back "%>"
                             )))

; .asp, .htm, .inc files will be parsed with mmm-mode
(add-to-list 'mmm-mode-ext-classes-alist '(nil "\\.\\(asp\\|htm\\|inc\\)" asp-perl))
(add-hook 'mmm-major-mode-hook 'turn-on-auto-fill)

; turn off background color for code blocks, may set it if you like
(set-face-background 'mmm-default-submode-face nil)
;(set-face-background 'mmm-default-submode-face "gray")

; set major mode for these files to HTML mode, except global.asa which you
; want to treat as a pure perl file
(setq auto-mode-alist (append '(
                                 ("\\.pm$" . cperl-mode)
                                 ("\\.asa$" . cperl-mode)
                                 ("\\.inc$" . html-mode)
                                 ("\\.htm" . html-mode)
                                 ("\\.asp$" . html-mode)
                                 ) auto-mode-alist))

--Josh

________________________________________________________________
Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to