[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master d64a049 192/433: Modified classes to use preferred mode li
From: |
Dmitry Gutov |
Subject: |
[elpa] master d64a049 192/433: Modified classes to use preferred mode list. |
Date: |
Thu, 15 Mar 2018 19:44:00 -0400 (EDT) |
branch: master
commit d64a049f9716e60daae5b3b93a0cae4771011398
Author: mas <mas>
Commit: mas <mas>
Modified classes to use preferred mode list.
---
mmm-mason.el | 18 ++++++------------
mmm-sample.el | 45 ++++++++++++++++++++++++++++-----------------
2 files changed, 34 insertions(+), 29 deletions(-)
diff --git a/mmm-mason.el b/mmm-mason.el
index d2a24ac..27d4ea0 100644
--- a/mmm-mason.el
+++ b/mmm-mason.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2000 by Michael Abraham Shulman
;; Author: Michael Abraham Shulman <address@hidden>
-;; Version: $Id: mmm-mason.el,v 1.10 2001/01/11 00:56:30 mas Exp $
+;; Version: $Id: mmm-mason.el,v 1.11 2001/01/11 01:41:12 mas Exp $
;;{{{ GPL
@@ -38,12 +38,6 @@
;;{{{ Perl Tags
-(defvar mmm-mason-perl-mode
- (if (fboundp 'cperl-mode) 'cperl-mode 'perl-mode)
- "What mode to use for Perl sections in Mason files.
-Usually either `perl-mode' or `cperl-mode'. The default is
-`cperl-mode' if that is available, otherwise `perl-mode'.")
-
(defvar mmm-mason-perl-tags
'("perl" "init" "cleanup" "once" "filter" "shared"
"perl_init" "perl_cleanup" "perl_once" "perl_filter"))
@@ -92,7 +86,7 @@ Saves the name of the tag matched.")
:insert ((?d mason-<%doc> nil @ "<%doc>" @ "\n"
_ "\n" @ "</%doc>" @)))
(mason-perl
- :submode ,mmm-mason-perl-mode
+ :submode perl
:match-face (("<%perl>" . mmm-code-submode-face)
("<%init>" . mmm-init-submode-face)
("<%cleanup>" . mmm-cleanup-submode-face)
@@ -112,7 +106,7 @@ Saves the name of the tag matched.")
(?l mason-<%filter> ?, . "filter")
(?s mason-<%shared> ?, . "shared")))
(mason-pseudo-perl
- :submode ,mmm-mason-perl-mode
+ :submode perl
:face mmm-declaration-submode-face
:front ,mmm-mason-pseudo-perl-tags-regexp
:back "</%~1>"
@@ -124,7 +118,7 @@ Saves the name of the tag matched.")
(?f mason-<%flags> ?. . "flags")
(?r mason-<%attr> ?. . "attr")))
(mason-inline
- :submode ,mmm-mason-perl-mode
+ :submode perl
:face mmm-output-submode-face
:front "<%"
:front-verify mmm-mason-verify-inline
@@ -132,7 +126,7 @@ Saves the name of the tag matched.")
:insert ((?% mason-<%-%> nil @ "<%" @ " " _ " " @ "%>" @)
(?5 mason-<%-%> ?% . nil)))
(mason-call
- :submode ,mmm-mason-perl-mode
+ :submode perl
:face mmm-special-submode-face
:front "<&"
:back "&>"
@@ -147,7 +141,7 @@ Saves the name of the tag matched.")
@ "%" @ "# " _ @ '(mmm-mason-end-line) "\n" @)
(?3 mason-%-comment ?# . nil)))
(mason-one-line
- :submode ,mmm-mason-perl-mode
+ :submode perl
:face mmm-code-submode-face
:front "^%"
:back "\n"
diff --git a/mmm-sample.el b/mmm-sample.el
index 368005a..5dba64e 100644
--- a/mmm-sample.el
+++ b/mmm-sample.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2000 by Michael Abraham Shulman
;; Author: Michael Abraham Shulman <address@hidden>
-;; Version: $Id: mmm-sample.el,v 1.11 2001/01/11 00:56:30 mas Exp $
+;; Version: $Id: mmm-sample.el,v 1.12 2001/01/11 01:41:12 mas Exp $
;;{{{ GPL
@@ -47,19 +47,13 @@
;;}}}
;;{{{ Javascript in HTML
-(defvar mmm-javascript-mode
- (if (fboundp 'javascript-mode) 'javascript-mode 'c++-mode)
- "What mode to use for Javascript regions.
-The default is `javascript-mode' if there is a function by that name,
-otherwise `c++-mode'. Some people prefer `c++-mode' regardless.")
-
;; We use two classes here, one for code in a <script> tag and another
;; for code embedded as a property of an HTML tag, then another class
;; to group them together.
(mmm-add-group
'html-js
- `((js-tag
- :submode ,mmm-javascript-mode
+ '((js-tag
+ :submode javascript
:face mmm-code-submode-face
:front "<script\[^>\]*>"
:back"</script>"
@@ -67,7 +61,7 @@ otherwise `c++-mode'. Some people prefer `c++-mode'
regardless.")
@ "\n" _ "\n" @ "</script>" @))
)
(js-inline
- :submode ,mmm-javascript-mode
+ :submode javascript
:face mmm-code-submode-face
:front "on\w+=\""
:back "\"")))
@@ -138,16 +132,10 @@ and MODE is a major mode function symbol.")
;;}}}
;;{{{ Embperl
-(defvar mmm-embperl-perl-mode
- (if (fboundp 'cperl-mode) 'cperl-mode 'perl-mode)
- "What mode to use for Perl sections in Embperl files.
-Usually either `perl-mode' or `cperl-mode'. The default is
-`cperl-mode' if that is available, otherwise `perl-mode'.")
-
(mmm-add-group
'embperl
'((embperl-perl
- :submode cperl-mode
+ :submode perl
:front "\\[\\([-\\+!\\*\\$]\\)"
:back "~1\\]"
:save-matches 1
@@ -219,6 +207,29 @@ Usually either `perl-mode' or `cperl-mode'. The default is
)))
;;}}}
+;;{{{ JSP Pages
+
+(mmm-add-group 'jsp
+ `((jsp-code
+ :submode java
+ :match-face (("<%!" . mmm-declaration-submode-face)
+ ("<%=" . mmm-output-submode-face)
+ ("<%" . mmm-code-submode-face))
+ :front "<%[!=]?"
+ :back "%>"
+ :insert ((?% jsp-code nil @ "<%" @ " " _ " " @ "%>" @)
+ (?! jsp-declaration nil @ "<%!" @ " " _ " " @ "%>" @)
+ (?= jsp-expression nil @ "<%=" @ " " _ " " @ "%>" @))
+ )
+ (jsp-directive
+ :submode text-mode
+ :face mmm-special-submode-face
+ :front "<%@"
+ :back "%>"
+ :insert ((?@ jsp-directive nil @ "<%@" @ " " _ " " @ "%>" @))
+ )))
+
+;;}}}
;; NOT YET UPDATED
;;{{{ HTML in PL/SQL;-COM-
- [elpa] master 6c208a3 158/433: Autoloaded `rpm-sh' submode class from mmm-rpm.el., (continued)
- [elpa] master 6c208a3 158/433: Autoloaded `rpm-sh' submode class from mmm-rpm.el., Dmitry Gutov, 2018/03/15
- [elpa] master 6e4e17e 181/433: Added Q about name capitalization., Dmitry Gutov, 2018/03/15
- [elpa] master b25ce5b 204/433: (mmm-insert-by-key): Use match-face and major-mode-preferences., Dmitry Gutov, 2018/03/15
- [elpa] master e2cabee 161/433: Autoloaded `rpm'., Dmitry Gutov, 2018/03/15
- [elpa] master 3fe80af 155/433: # Updated., Dmitry Gutov, 2018/03/15
- [elpa] master 800e78a 171/433: (mmm-save-local-variables): Added abbrev-mode variables., Dmitry Gutov, 2018/03/15
- [elpa] master a040c3d 176/433: Added comment about installing with multiple emacsen., Dmitry Gutov, 2018/03/15
- [elpa] master 885e2fb 180/433: (mmm-keywords-used): Added `:private'., Dmitry Gutov, 2018/03/15
- [elpa] master e0a2e51 196/433: (mmm-save-local-variables): Added syntax and indentation variables for, Dmitry Gutov, 2018/03/15
- [elpa] master d674c74 202/433: (mmm-format-matches): Removed reference to `count' variable., Dmitry Gutov, 2018/03/15
- [elpa] master d64a049 192/433: Modified classes to use preferred mode list.,
Dmitry Gutov <=
- [elpa] master b0b7520 217/433: # Added comment about bug fix., Dmitry Gutov, 2018/03/15
- [elpa] master 293e13a 198/433: (mmm-format-matches): Changed to allow accessing any subexp, not, Dmitry Gutov, 2018/03/15
- [elpa] master 2a00982 215/433: * mmm-mason.el (mmm-mason-end-line, mmm-mason-start-line): Use bolp, Dmitry Gutov, 2018/03/15
- [elpa] master 1ef198a 219/433: # Updated, Dmitry Gutov, 2018/03/15
- [elpa] master ef73242 214/433: Added `javascript-mode' to list of C-derived modes., Dmitry Gutov, 2018/03/15
- [elpa] master 23170fe 205/433: Added `mmm-primary-mode' variable so that `major-mode' can be saved., Dmitry Gutov, 2018/03/15
- [elpa] master 72ca55f 213/433: # Updated menus., Dmitry Gutov, 2018/03/15
- [elpa] master c95f9b0 157/433: Added file (contributed by Marcus Harnisch)., Dmitry Gutov, 2018/03/15
- [elpa] master c9c6c19 194/433: Added ePerl and JSP to autoload., Dmitry Gutov, 2018/03/15
- [elpa] master c659e19 141/433: Released 0.4.4, Dmitry Gutov, 2018/03/15