[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master cbbb3cc 162/433: Added comments on RPM Spec, File Variable
From: |
Dmitry Gutov |
Subject: |
[elpa] master cbbb3cc 162/433: Added comments on RPM Spec, File Variables, and Here-documents. |
Date: |
Thu, 15 Mar 2018 19:43:55 -0400 (EDT) |
branch: master
commit cbbb3cc0a8c2b43c44753d07d9272a88bad5c4f9
Author: mas <mas>
Commit: mas <mas>
Added comments on RPM Spec, File Variables, and Here-documents.
---
mmm.texinfo | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 65 insertions(+), 5 deletions(-)
diff --git a/mmm.texinfo b/mmm.texinfo
index 3e7cba5..89fc469 100644
--- a/mmm.texinfo
+++ b/mmm.texinfo
@@ -107,7 +107,7 @@ Customizing MMM Mode
Supplied Submode Classes
* Mason:: Mason syntax for server-side Perl in HTML.
-* Eval-Elisp:: Emacs Lisp in @code{eval} file variables.
+* File Variables:: Elisp code in File Variables.
* Here-documents:: Code in shell and Perl here-documents.
* Javascript:: Javascript embedded in HTML.
* Embedded CSS:: CSS Styles embedded in HTML.
@@ -1140,7 +1140,7 @@ delimiter.
PRIVATE
address@hidden Mason, Eval-Elisp, Writing Classes, Top
address@hidden Mason, File Variables, Writing Classes, Top
@comment node-name, next, previous, up
@chapter Mason: Perl in HTML
@@ -1222,15 +1222,58 @@ This tells PSGML that the current file is a
sub-document of the file
alleviating its confusion.
address@hidden Eval-Elisp, Here-documents, Mason, Top
address@hidden File Variables, Here-documents, Mason, Top
@comment node-name, next, previous, up
address@hidden Eval-Elisp: Elisp in a Local Variables List
address@hidden Elisp in a Local Variables List
+Emacs allows the author of a file to specify major and minor modes to be
+used while editing that file, as well as specifying values for other
+local Elisp variables, with a File Variables list. @xref{File
+Variables, , , emacs, The Emacs Manual}. Since file variables values
+are Elisp objects (and with the @code{eval} special ``variable'', they
+are forms to be evaluated), one might want to edit them in
address@hidden The submode class @code{file-variables} allows
+this, and is suitable for turning on in a given file with
address@hidden, or in all files with @code{mmm-global-classes}.
address@hidden Here-documents, Javascript, Eval-Elisp, Top
+
address@hidden Here-documents, Javascript, File Variables, Top
@comment node-name, next, previous, up
@chapter Here-documents
+One of the long-time standard syntaxes for outputting large amounts of
+code (or text, or HTML, or whatever) from a script (notably shell
+scripts and Perl scripts) is the here-document syntax:
+
address@hidden
+print <<END_HTML;
+<html>
+ <head>
+ <title>Test Page</title>
+ </head>
+ <body>
+END_HTML
address@hidden example
+
+The @code{here-doc} submode class recognizes this syntax, and can even
+guess the correct submode to use in many cases. For instance, it would
+put the above example in @code{html-mode}, noticing the string
address@hidden in the name of the here-document. If you use less than
+evocative here-document names, or if the submode is recognized
+incorrectly for any other reason, you can tell it explicitly what
+submode to use.
+
address@hidden mmm-here-doc-mode-alist
+The value of this variable should be an alist, each element a cons pair
+associating a regular expression to a submode symbol. Whenever a
+here-document name matches one of these regexps, the corresponding
+submode is applied. For example, if this variable contains the element
address@hidden("CODE" . cc-mode)}, then any here-document whose name contains
+the string @samp{CODE} will be put in @code{cc-mode}. The value of this
+variable overrides any guessing that the @code{here-doc} submode class
+would do otherwise.
address@hidden defopt
+
@node Javascript, Embedded CSS, Here-documents, Top
@comment node-name, next, previous, up
@@ -1251,6 +1294,23 @@ alleviating its confusion.
@comment node-name, next, previous, up
@chapter RPM Spec Files
address@hidden contains the definition of an MMM Mode submode class
+for editing shell script sections within RPM (Redhat Package Manager)
+spec files. It is recommended for use in combination with
address@hidden by Stig Bj�rlykke <stigb@@tihlde.hist.no> and
+Steve Sanbeg <sanbeg@@dset.com>
+(@uref{http://www.xemacs.org/~stigb/rpm-spec-mode.el}).
+
+Suggested setup code:
+
address@hidden
+(add-to-list 'mmm-mode-ext-classes-alist
+ '(rpm-spec-mode "\\.spec\\'" rpm-sh))
address@hidden lisp
+
+Thanks to Marcus Harnisch <Marcus.Harnisch@@gmx.net> for contributing
+this submode class.
+
@node Concept Index, Function Index, RPM, Top
@comment node-name, next, previous, up
- [elpa] master 28cda1d 160/433: # Added headers., (continued)
- [elpa] master 28cda1d 160/433: # Added headers., Dmitry Gutov, 2018/03/15
- [elpa] master ad9724f 140/433: # Updated., Dmitry Gutov, 2018/03/15
- [elpa] master 36e10b1 167/433: (mmm-ify): Explicitly set defaults for keywords in &rest parameter., Dmitry Gutov, 2018/03/15
- [elpa] master 944e3b4 173/433: Set MASON_VERSION., Dmitry Gutov, 2018/03/15
- [elpa] master 588edf0 169/433: (mmm-set-file-name-for-modes): Changed to a list for finer control., Dmitry Gutov, 2018/03/15
- [elpa] master 5f96947 177/433: # Added comment about apostrophes, Dmitry Gutov, 2018/03/15
- [elpa] master a58c9bc 178/433: Added comment about adding files to the distribution., Dmitry Gutov, 2018/03/15
- [elpa] master e31cf25 170/433: (mmm-update-mode-info): Tested against `mmm-set-file-name-for-modes'., Dmitry Gutov, 2018/03/15
- [elpa] master 2defd28 188/433: (mmm-save-local-variables): Added `parse-sexp-ignore-comments', which, Dmitry Gutov, 2018/03/15
- [elpa] master e4084f8 186/433: Added set-background example for XEmacs., Dmitry Gutov, 2018/03/15
- [elpa] master cbbb3cc 162/433: Added comments on RPM Spec, File Variables, and Here-documents.,
Dmitry Gutov <=
- [elpa] master 7374d58 193/433: Added ePerl submode class., Dmitry Gutov, 2018/03/15
- [elpa] master 2802d0b 182/433: # Updated., Dmitry Gutov, 2018/03/15
- [elpa] master 2d7d17f 195/433: (mmm-major-mode-preferences): Added check for `jde-mode' for Java code., Dmitry Gutov, 2018/03/15
- [elpa] master 33baef7 179/433: Added file, Dmitry Gutov, 2018/03/15
- [elpa] master ad6a934 199/433: # Updated docstring, Dmitry Gutov, 2018/03/15
- [elpa] master 1c8d387 201/433: Allowed language names for preference lookup as "mode names"., Dmitry Gutov, 2018/03/15
- [elpa] master f0e34d0 185/433: (mmm-apply-class): Rearranged parameters so faces actually work., Dmitry Gutov, 2018/03/15
- [elpa] master 86803d6 200/433: (mmm-set-major-mode-preferences): Added function., Dmitry Gutov, 2018/03/15
- [elpa] master 4bdcb2f 224/433: Fixed inline JavaScript regexp ( \w ==> \\w )., Dmitry Gutov, 2018/03/15
- [elpa] master 62b7c8c 233/433: # Updated for recent changes in configuration., Dmitry Gutov, 2018/03/15