Initial Commit
[packages] / xemacs-packages / mmm-mode / README
1
2                           MMM Mode for Emacs
3                           ==================
4
5 OVERVIEW
6
7   MMM Mode is a minor mode for Emacs that allows Multiple Major Modes
8   to coexist in one buffer.  It is well-suited to editing:
9
10   * Preprocessed code, such as server-side Perl or PHP embedded in HTML
11   * Code generating code, such as HTML output by CGI scripts
12   * Embedded code, such as Javascript in HTML
13   * Literate programming: code interspersed with documentation, e.g. Noweb
14
15 INSTALLATION
16
17   MMM Mode has a standard GNU configure-driven installation.  (See the
18   file INSTALL for generic instructions, most of which don't apply.)
19   To install in the standard locations, unpack the archive, `cd' to
20   the mmm-mode-X.X.X directory created, and run these commands:
21
22     ./configure
23     make
24     make install
25
26   Alternately, since currently MMM Mode is written in pure Emacs Lisp,
27   you could just copy all the *.el files in the distribution to a
28   directory in your `load-path', and optionally byte-compile them
29   manually (see the Emacs Manual).  The configure installation also
30   installs the MMM Mode info manual in your site info directory, so if
31   you're installing manually, you might want to do that too.
32
33   If you're installing from the CVS version, you won't have the
34   configure script.  If you have the automake/autoconf tools
35   installed, you can run the script `autogen.sh' first, and then
36   proceed as above.  Otherwise, you'll have to copy the *.el files
37   manually as described above.
38
39   If you have more than one version of emacs installed and want to
40   use MMM in a version other than /usr/bin/emacs, you must set the
41   environment variable EMACS before running `configure', e.g.
42
43     EMACS=/usr/bin/xemacs ./configure
44     make
45     make install
46
47   If you want to use MMM in more than one version of emacs, you must
48   either have separate site-lisp directories (such as Debian does), or
49   load it from source every time; byte-compiled files are not portable
50   between emacsen.
51
52 CONFIGURATION
53
54   Once MMM Mode is installed, it has to be configured correctly.  This
55   can be done in a site-start file or in user's initialization files;
56   usually the latter is preferable, except possibly for autoloads.
57   First the package needs to be loaded, with either
58
59     (require 'mmm-mode)
60
61   or instead, to save time during emacs startup,
62
63     (require 'mmm-auto)
64
65   Then you will probably want to set something like this:
66
67     (setq mmm-global-mode 'maybe)
68     (mmm-add-mode-ext-class 'html-mode "\\.php\\'" 'html-php)
69
70   The first line tells MMM Mode to load itself whenever you open an
71   appropriate file, and the second is an example which says to notice
72   PHP regions in html-mode files having a `.php' extension.  Both
73   lines are necessary.
74
75   You will, of course, want to change and duplicate the second line
76   according to your needs. either of the first two parameters can be
77   `nil', meaning not to consider that criterion.  For example, if all
78   your html files, regardless of extension, are Mason components, you
79   will want something like:
80
81     (mmm-add-mode-ext-class 'html-mode nil 'mason)
82
83   whereas if all your files with a `.nw' extension, regardless of
84   primary mode (some may be LaTeX, others HTML, say) are Noweb, you
85   will prefer
86
87     (mmm-add-mode-ext-class nil "\\.nw\\'" 'noweb)
88
89   See the info file for more extensive documentation, and for other
90   configuration options.
91
92 DOCUMENTATION
93
94   For further information, see (in order) the accompanying info file,
95   the documentation strings of functions and variables, the comments
96   in the source code, and the source code itself.
97
98 UPDATES
99
100   The latest version of MMM Mode should always be available from
101   http://sourceforge.net/projects/mmm-mode
102
103 BUG REPORTS
104
105   Bug reports and suggestions can be submitted at
106   <http://sourceforge.net/tracker/?group_id=8658&atid=108658>, or
107   through email to <viritrilbia@users.sourceforge.net>.
108
109 CONTACT INFO
110
111   MMM Mode is written and maintained by Michael Shulman,
112   <viritrilbia@users.sourceforge.net>, and others; a list of some
113   contributors can be found on the Sourceforge project.
114
115 MAILING LIST
116
117   To subscribe to the MMM Mode mailing list, visit
118   <http://lists.sourceforge.net/mailman/listinfo/mmm-mode-discuss>.
119   The mailing list receives announcements of new releases and provides
120   a forum for discussion of bugs and features.
121
122   Thanks for using MMM Mode!