[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master efe3dbf 092/433: Wrote more about Mason.
From: |
Dmitry Gutov |
Subject: |
[elpa] master efe3dbf 092/433: Wrote more about Mason. |
Date: |
Thu, 15 Mar 2018 19:43:42 -0400 (EDT) |
branch: master
commit efe3dbf71e158dda2affdc21cf4a592d4e647b93
Author: mas <mas>
Commit: mas <mas>
Wrote more about Mason.
---
mmm.texinfo | 87 ++++++++++++++++++++++++++++++++++---------------------------
1 file changed, 49 insertions(+), 38 deletions(-)
diff --git a/mmm.texinfo b/mmm.texinfo
index 9cf2c94..51560e2 100644
--- a/mmm.texinfo
+++ b/mmm.texinfo
@@ -159,7 +159,7 @@ MMM Mode is a general extension to Emacs which has many
uses. Currently,
its most common usage is to edit Mason components. Mason is a
``Perl-based web site development and delivery engine'' which executes
Perl code embedded in HTML and other types of documents. For more
-information, see @url{http://www.masonhq.com}. MMM Mode comes with a
+information, see @uref{http://www.masonhq.com}. MMM Mode comes with a
submode class (@pxref{Submode Classes}) for editing Mason components
(@pxref{Mason}).
@@ -840,50 +840,61 @@ you, you can turn it off.
@comment node-name, next, previous, up
@chapter Mason: Perl in HTML
-The Mason submode class is defined in the file "mmm-mason.el", so to use
-it, you will need to @code{(require 'mmm-mason)}.
+Mason is a syntax to embed Perl code in HTML and other documents. See
address@hidden://www.masonhq.com} for more information. The submode class
+for Mason components is called `mason' and must be loaded from
+`mmm-mason.el' before it can be used; the easiest way to put the
+following line in .emacs:
-FIXME: This is copied from the comments in @file{mmm-mason.el}. Some
-more info would be nice.
-
-;; CPerl Workaround
-
-;; Note that CPerl mode tends to think it starts in the middle of an
-;; expression at the beginning of a submode region, and indents the
-;; first statement a couple extra columns. A workaround I've found is
-;; to begin all multiline Perl sections with an empty statement:
-
-;; <%perl>;
-;; print $var;
-;; </%perl>
-
-;; It isn't pretty, but it isn't ugly either, and it works better than
-;; anything else I can think of.
-
-;; PSGML Workaround
-
-;; Michael Alan Dorman has reported problems with psgml-mode and
-;; Mason. He suggests adding these lines to .emacs to turn it off.
-
-;; (delete '("\\.html$" . sgml-html-mode) auto-mode-alist)
-;; (delete '("\\.shtml$" . sgml-html-mode) auto-mode-alist)
address@hidden
+(require 'mmm-mason)
address@hidden lisp
-;; Maybe these problems will be fixed in the future.
+The current Mason class is intended to correctly recognize all syntax
+valid in Mason 0.87. There are insertion keys for most of the available
+syntax; use @code{mmm-insertion-help} (@kbd{C-c % h} by default) with
+Mason on to get a list.
+
+If you want to have mason submodes automatically in all Mason files, you
+can use automatic mode and filename associations; the details depend on
+what you call your Mason components and what major mode you use.
address@hidden Classes}. If you use an extension for your Mason files
+that emacs does not automatically place in your preferred HTML Mode, you
+will probably want to associate that extension with your HTML Mode as
+well; @ref{Choosing Modes, , , emacs, The Emacs Manual}. This also goes
+for ``special'' Mason files such as autohandlers and dhandlers.
+
+There are also certain problems with CPerl mode in submode regions.
+(Not to say that the original perl-mode would do any better---it hasn't
+been much tried.) First of all, the first line of a Perl section is
+usually indented as if it were a continuation line. A fix for this is
+to start with a semicolon on the first line. The insertion key commands
+do this whenever the Mason syntax allows it.
-;; autohandlers and dhandlers
address@hidden
+<%perl>;
+print $var;
+</%perl>
address@hidden example
-;; Another useful thing to do with Mason is putting autohandlers and
-;; dhandlers in html-mode (and thus, assuming mmm-mode-ext-classes is
-;; set up correctly, mmm-mode/mason). One way to do this is a line
-;; such as
+In addition, some users have reported that the CPerl indentation
+sometimes does not work. This problem has not yet been tracked down,
+however, and more data about when it happens would be helpful.
-;; %# -*- mode: html; mmm-classes: mason -*-
+Michael Alan Dorman has reported problems using PSGML with Mason. He
+suggests adding these lines to @file{.emacs} to turn it off.
-;; at the top of each such file. Another option is to a line like this
-;; to .emacs, which will put all files named "autohandler" or
-;; "dhandler" into html-mode:
address@hidden
+(delete '("\\.html$" . sgml-html-mode) auto-mode-alist)
+(delete '("\\.shtml$" . sgml-html-mode) auto-mode-alist)
address@hidden lisp
-;; (add-to-list 'auto-mode-alist '("\\(auto\\|d\\)handler\\'" . html-mode))
+Other users report using PSGML with Mason and MMM Mode without
+difficulty. If you don't have problems and want to use PSGML, simply
+replace @code{html-mode} everywhere in the suggested code with
address@hidden or @code{sgml-mode}. Similarly, if you are using
+XEmacs and want to use the alternate HTML mode @code{hm--html-mode},
+replace @code{html-mode} with that symbol.
@node Eval-Elisp, HTML Here-documents, Mason, Top
- [elpa] master bf3b29e 100/433: # Updated, (continued)
- [elpa] master bf3b29e 100/433: # Updated, Dmitry Gutov, 2018/03/15
- [elpa] master c76f5a3 099/433: Added to CVS., Dmitry Gutov, 2018/03/15
- [elpa] master 89daaab 103/433: # Added comment about universal mode., Dmitry Gutov, 2018/03/15
- [elpa] master a0e97ea 108/433: (mmm-save-local-variables): Changed `defcustom' to `defvar'., Dmitry Gutov, 2018/03/15
- [elpa] master 70a94da 109/433: (mmm-run-major-mode-hook): Added `ignore-errors' around each call., Dmitry Gutov, 2018/03/15
- [elpa] master 7a12efa 111/433: Added MASON_VERSION variable to keep track of that., Dmitry Gutov, 2018/03/15
- [elpa] master e7da5c1 117/433: # Updated., Dmitry Gutov, 2018/03/15
- [elpa] master 88d1d46 115/433: (mmm-univ-get-mode): Signaled error on non-fboundp modes., Dmitry Gutov, 2018/03/15
- [elpa] master 752288f 113/433: Added `mmm-no-matching-submode' error signal., Dmitry Gutov, 2018/03/15
- [elpa] master 3ee92f7 091/433: Moved commentary code to README.Mason., Dmitry Gutov, 2018/03/15
- [elpa] master efe3dbf 092/433: Wrote more about Mason.,
Dmitry Gutov <=
- [elpa] master e632aec 105/433: Limited matches to letter/dash strings that are fboundp., Dmitry Gutov, 2018/03/15
- [elpa] master b73a727 018/433: Added to CVS (formerly not under RCS)., Dmitry Gutov, 2018/03/15
- [elpa] master 28e978c 118/433: (mmm-ify-by-class): Added completion on all defined classes., Dmitry Gutov, 2018/03/15
- [elpa] master 34fbbd5 120/433: # Updated docstring., Dmitry Gutov, 2018/03/15
- [elpa] master d856bc2 106/433: Wrote about global classes, highlight, mode line, and hooks., Dmitry Gutov, 2018/03/15
- [elpa] master 3cd5dcb 123/433: Changed output name from `mmm' to `mmm-mode'., Dmitry Gutov, 2018/03/15
- [elpa] master a8a9d33 122/433: Updated file-variables class to handle prefixes., Dmitry Gutov, 2018/03/15
- [elpa] master 8fd343b 119/433: # Updated folding marks., Dmitry Gutov, 2018/03/15
- [elpa] master 239284f 124/433: # Updated, Dmitry Gutov, 2018/03/15
- [elpa] master c74eeb5 125/433: # Updated email address, Dmitry Gutov, 2018/03/15