home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
m
/
m4v05as.zip
/
PLANS
< prev
next >
Wrap
Text File
|
1992-02-19
|
2KB
|
62 lines
Future ideas and plans for GNU m4. -*- text -*-
If you have any comments on these things, or just good ideas of your own, I
would very much like to hear about them.
Include file path search
========================
The ability for search through a user specified search path for files
mentioned in `include' and `sinclude' calls would be useful, especially if you
tend to build up libraries for useful macros, for common use.
The implementation would use an environment variable, M4PATH, and an `-Idir'
command line option. The search path for an included file would then be:
first the directories mentioned on the command line, then the directories from
the colon separated list in M4PATH, and last the current working directory.
If there are no -I options, and M4PATH is not set, the behaviour is as it has
always been.
A new `format' builtin
======================
This will support printf-like formatting capabilities, which will be useful
when making (semi-)tabular output. The syntax will be
format(fmt, arg1, arg2, ...)
where `fmt' can contain `%' specifications, with field widths and precisions
as usual. The expansion will be the formatted string.
A new `regexp' builtin
======================
This will support matching regular expressions in m4. I imagine a syntax with
two or three arguments. If called with two arguments,
regexp(regular expression, string)
`regexp' will expand to either `0' or `1', depending on whether `string'
matches the regular expression. Called with three arguments, it is possible
to control the expansion.
regexp(regular expression, string, substitution)
Here the expansion is `substitution' with `\digit' and `\&' sequences
substituted as usual.
Shorthands in translit
======================
The `translit' builtin should support shorthands, like tr(1) does. This might
be implementated in a future version of GNU m4.