[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 9b5e8f4 009/433: Distinguished between Perl sections and p
From: |
Dmitry Gutov |
Subject: |
[elpa] master 9b5e8f4 009/433: Distinguished between Perl sections and pseudo-Perl sections. The one |
Date: |
Thu, 15 Mar 2018 19:43:25 -0400 (EDT) |
branch: master
commit 9b5e8f4d71c77ab2d67873656fe4b0f509afe278
Author: mas <mas>
Commit: mas <mas>
Distinguished between Perl sections and pseudo-Perl sections. The one
inserts ; at the beginning for indentation hack, the other doesn't
because the Mason syntax doesn't allow it and indentation is generally
unnecessary anyway.
---
mmm-mason.el | 31 +++++++++++++++++++++++--------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/mmm-mason.el b/mmm-mason.el
index 3f3c1fa..f55d214 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.4 2000/05/03 21:48:44 mas Exp $
+;; Version: $Id: mmm-mason.el,v 1.5 2000/05/10 05:28:18 mas Exp $
;;{{{ GPL
@@ -87,9 +87,11 @@ 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" "args" "once" "filter" "perl_init"
- "perl_cleanup" "perl_args" "perl_once" "perl_filter"
- "attr" "flags" "shared"))
+ '("perl" "init" "cleanup" "once" "filter" "shared"
+ "perl_init" "perl_cleanup" "perl_once" "perl_filter"))
+
+(defvar mmm-mason-pseudo-perl-tags
+ '("args" "perl_args" "attr" "flags"))
(defvar mmm-mason-non-perl-tags
'("doc" "perl_doc" "text" "perl_text" "def" "perl_def" "method"))
@@ -99,6 +101,11 @@ Usually either `perl-mode' or `cperl-mode'. The default is
"Matches tags beginning Mason sections containing Perl code.
Saves the name of the tag matched.")
+(defvar mmm-mason-pseudo-perl-tags-regexp
+ (concat "<%" (mmm-regexp-opt mmm-mason-pseudo-perl-tags t) ">")
+ "Match tags beginning Mason sections that look like Perl but aren't.
+Saves the name of the tag matched.")
+
(defvar mmm-mason-tag-names-regexp
(regexp-opt (append mmm-mason-perl-tags mmm-mason-non-perl-tags) t)
"Matches any Mason tag name after the \"<%\". Used to verify that a
@@ -132,17 +139,25 @@ Saves the name of the tag matched.")
:back "</%~1>"
:save-matches 1
:insert ((?, mason-<%TAG> "Perl section: " @ "<%" str ">" @
- ";\n" _ "\n" @ "</%" str ">" @)
+ ";\n" _ "\n" @ "</%" str ">" @)
(?< mason-<%TAG> ?, . nil)
(?p mason-<%perl> ?, . "perl")
(?i mason-<%init> ?, . "init")
- (?a mason-<%args> ?, . "args")
- (?f mason-<%flags> ?, . "flags")
- (?r mason-<%attr> ?, . "attr")
(?c mason-<%cleanup> ?, . "cleanup")
(?o mason-<%once> ?, . "once")
(?l mason-<%filter> ?, . "filter")
(?s mason-<%shared> ?, . "shared")))
+ (mason-pseudo-perl
+ :submode ,mmm-mason-perl-mode
+ :front ,mmm-mason-pseudo-perl-tags-regexp
+ :back "</%~1>"
+ :save-matches 1
+ :insert ((?. mason-pseudo-<%TAG> "Pseudo-perl section: " @ "<%" str ">" @
+ "\n" _ "\n" @ "</%" str ">" @)
+ (?> mason-pseudo-<%TAG> ?, . nil)
+ (?a mason-<%args> ?. . "args")
+ (?f mason-<%flags> ?. . "flags")
+ (?r mason-<%attr> ?. . "attr")))
(mason-inline
:submode ,mmm-mason-perl-mode
:front "<%"
- [elpa] master 793c81e 003/433: Loaded CL at top level for byte-compile., (continued)
- [elpa] master 793c81e 003/433: Loaded CL at top level for byte-compile., Dmitry Gutov, 2018/03/15
- [elpa] master 88e8b9f 002/433: Put all `require's not needed at compile-time into `progn's so the, Dmitry Gutov, 2018/03/15
- [elpa] master cfb0dbc 008/433: Fixed "sub"-insertion specs like <%perl> under <%TAG> not to insert, Dmitry Gutov, 2018/03/15
- [elpa] master 0fcfb2b 004/433: Required font-lock and mmm-auto at top level for byte compilation., Dmitry Gutov, 2018/03/15
- [elpa] master 20bdf05 010/433: Changed insertion key of <%doc> to `d' and added insertion of %#, Dmitry Gutov, 2018/03/15
- [elpa] master 47952d1 007/433: Added dependencies on mmm-compat and mmm-vars., Dmitry Gutov, 2018/03/15
- [elpa] master 73dab9f 011/433: Fixed bug: # is not allowed in symbols., Dmitry Gutov, 2018/03/15
- [elpa] master 70899d9 005/433: Changed (progn (require ...)) to (when t (require ...)) because the, Dmitry Gutov, 2018/03/15
- [elpa] master ffdc253 013/433: `require'd mmm-vars at top level for byte-compiling., Dmitry Gutov, 2018/03/15
- [elpa] master aaf649c 016/433: (mmm-version): changed to 0.3.8., Dmitry Gutov, 2018/03/15
- [elpa] master 9b5e8f4 009/433: Distinguished between Perl sections and pseudo-Perl sections. The one,
Dmitry Gutov <=
- [elpa] master 4ccebfd 014/433: Moved `require's back to top level for byte-compiling., Dmitry Gutov, 2018/03/15
- [elpa] master da0aa8f 015/433: Moved `require's back to top level for byte-compiling. Added dummy, Dmitry Gutov, 2018/03/15
- [elpa] master 23ff01c 017/433: Pre-added major mode hook to text-mode-hook., Dmitry Gutov, 2018/03/15
- [elpa] master 706c1c3 020/433: Ignored Makefile.in, Makefile, and configure., Dmitry Gutov, 2018/03/15
- [elpa] master 190ba7f 012/433: Added all the elisp files to EXTRA_DIST, since Automake doesn't see, Dmitry Gutov, 2018/03/15
- [elpa] master 2f740d8 022/433: Added info file and auxiliary compilation and texinfo files., Dmitry Gutov, 2018/03/15
- [elpa] master 821960c 021/433: Added configure auxiliary files., Dmitry Gutov, 2018/03/15
- [elpa] master 455ee7c 006/433: Initial revision, Dmitry Gutov, 2018/03/15
- [elpa] master fa54563 027/433: # Updated., Dmitry Gutov, 2018/03/15
- [elpa] master fd76a7a 024/433: # Per-buffer local variable saving., Dmitry Gutov, 2018/03/15