Initial Commit
[packages] / xemacs-packages / mmm-mode / TODO
1 Hey Emacs, this is a -*-text-*- file!
2
3                        To Do List for MMM Mode
4                        =======================
5
6 It would be nice to have a "split region" command which would insert
7 a _back_ delimiter followed by a _front_ delimiter at point and split
8 the current region into two regions.  Say for PHP.
9
10 Custom mode functions like `mason-mode'.
11
12 Make Mason work a little better with PSGML.  The fix I've found works,
13 but it would be nifty if MMM could do it automatically.  Maybe the
14 custom-mode thing could set the variables, or a hook somewhere.
15
16 Apostrophes mess up Perl parsing in XEmacs but not Emacs.  I thought
17 it was because XEmacs sets `font-lock-beginning-of-syntax-function'
18 after MMM does, but changing that that didn't fix it.
19
20 Improve re-parsing current region to use inclusion/offsets/etc.
21
22 Support for: ASP, PHP
23
24 DEB and/or RPM packages would be nice.
25
26 The local-variables improvements can probably be used to set minor
27 modes locally to submode regions.  This could replace tmmofl,
28 especially if we search for regions other than by regexps, say by
29 syntax properties.
30
31 Trap paragraph motion commands to stop at submode boundaries?
32
33 On text insertion (in `after-change-functions'), do two things.
34 First, if inside in a region, or after a hanging one, scan for its
35 back and adjust if necessary.  Second, scan both for complete regions
36 and for hanging fronts.  In the latter case, we may insert the back or
37 start a hanging region; user option.  Don't just scan the inserted
38 text, but backwards, using `mmm-looking-back-at'.  Remember to handle
39 delimiter inclusion and offsets as best possible.
40
41 It would be nice if C-j ended a Mason one-liner and began a new one on
42 the next line.  This is a rather Mason-specific thing, but other
43 classes might have similar single-line regions.  Add a new submode
44 class argument, such as KEYMAP, or even ONE-LINE?
45
46 Allow a submode class to specify its allowable "parent" submode
47 classes.  This could also be used to implement htp.p, by first
48 scanning for the function calls as a major-mode submode region, then
49 requiring that parent type for the HTML mode class.  Nested submodes
50 alternate highlight colors, say with `mmm-secondary-submode-face'.
51
52 Ought %text in Mason to be a non-submode, since any Mason tags inside
53 it will probably be /edited/ as Perl (being, say, code examples)?
54 Only problem is it might confuse the programmer into thinking that
55 code will get executed. Maybe use a different face.  Could do that
56 with another grouping class, say uneval-mason, that overrides the
57 faces of mason and has :parent mason-text, and allow a mode to specify
58 what about it changes depending on its parent, or a parent to specify
59 changes to its children, or a group to specify changes to its members.
60
61 If font-locking needs more help, try narrowing the region before
62 fontifying, or even advising `parse-partial-sexp' and friends.  At
63 present, it seems good enough, though.
64
65 It'd be nice if submode regions could preserve the indentation of the
66 dominant major mode code around them. For example, Perl code embedded
67 in HTML where the HTML is indented such as for a table.