emacs-elpa-diffs
[Top][All Lists]
Advanced

[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-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]