File: mmm-asp-perl.el

package info (click to toggle)
libapache-asp-perl 2.62-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 4,108 kB
  • ctags: 830
  • sloc: perl: 6,033; php: 417; sh: 65; lisp: 22; makefile: 10
file content (36 lines) | stat: -rwxr-xr-x 1,221 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
;;; 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))