aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2007-05-27 20:00:10 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2007-05-27 20:00:10 +0000
commit6bb637f647598002be3c8acfaf3b396966d3e581 (patch)
treeead65d2b207e8874684c558d4127e93a346ddc7d
parente3b13bbba66a92a75ac73d3ab50bca45d69c7c0d (diff)
downloadmailfromd-6bb637f647598002be3c8acfaf3b396966d3e581.tar.gz
mailfromd-6bb637f647598002be3c8acfaf3b396966d3e581.tar.bz2
Improve mfl-mode
git-svn-id: file:///svnroot/mailfromd/trunk@1479 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r--ChangeLog15
-rw-r--r--NEWS11
-rw-r--r--doc/mailfromd.texi78
-rw-r--r--elisp/mfl-mode.el306
-rw-r--r--etc/mailfromd.rc95
-rw-r--r--tests/bctx00.at2
-rw-r--r--tests/etc/accept.rc3
-rw-r--r--tests/etc/ack.rc50
-rw-r--r--tests/etc/arg.rc40
-rw-r--r--tests/etc/catch.rc51
-rw-r--r--tests/etc/catch01.rc63
-rw-r--r--tests/etc/cidr.rc39
-rw-r--r--tests/etc/cond.rc55
-rw-r--r--tests/etc/dns.rc58
-rw-r--r--tests/etc/farg.rc41
-rw-r--r--tests/etc/greylist.rc43
-rw-r--r--tests/etc/macros.rc49
-rw-r--r--tests/etc/ml.rc1
-rw-r--r--tests/etc/numrcpt.rc39
-rw-r--r--tests/etc/poll-1.rc51
-rw-r--r--tests/etc/poll.rc49
-rw-r--r--tests/etc/prec.rc37
-rw-r--r--tests/etc/reject.rc3
-rw-r--r--tests/etc/relayed.rc40
-rw-r--r--tests/etc/sa01.rc39
-rw-r--r--tests/etc/sa02.rc39
-rw-r--r--tests/etc/sa03.rc41
-rw-r--r--tests/etc/sa04.rc41
-rw-r--r--tests/etc/shadow.rc47
-rw-r--r--tests/etc/strings.rc55
-rw-r--r--tests/etc/switch.rc79
-rw-r--r--tests/etc/tempfail.rc3
-rw-r--r--tests/etc/var.rc35
-rw-r--r--tests/fctx00.at2
-rw-r--r--tests/macros.at2
-rw-r--r--tests/shadow.at4
36 files changed, 977 insertions, 629 deletions
diff --git a/ChangeLog b/ChangeLog
index ca710d51..f97a4dc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
12007-05-27 Sergey Poznyakoff <gray@gnu.org.ua>
2
3 * elisp/mfl-mode.el: Initial implementation
4 * tests/shadow.at, tests/bctx00.at, tests/fctx00.at,
5 tests/macros.at, tests/etc/reject.rc, tests/etc/farg.rc,
6 tests/etc/cidr.rc, tests/etc/catch.rc, tests/etc/catch01.rc,
7 tests/etc/cond.rc, tests/etc/dns.rc, tests/etc/macros.rc,
8 tests/etc/shadow.rc, tests/etc/relayed.rc, tests/etc/var.rc,
9 tests/etc/numrcpt.rc, tests/etc/strings.rc, tests/etc/prec.rc,
10 tests/etc/ack.rc, tests/etc/accept.rc, tests/etc/switch.rc,
11 tests/etc/tempfail.rc, tests/etc/greylist.rc, tests/etc/poll-1.rc,
12 tests/etc/sa01.rc, tests/etc/sa02.rc, tests/etc/poll.rc,
13 tests/etc/sa03.rc, tests/etc/sa04.rc, tests/etc/ml.rc,
14 tests/etc/arg.rc, etc/mailfromd.rc: Use MFL Emacs mode
15
12007-05-26 Sergey Poznyakoff <gray@gnu.org.ua> 162007-05-26 Sergey Poznyakoff <gray@gnu.org.ua>
2 17
3 * doc/mailfromd.texi: Update 18 * doc/mailfromd.texi: Update
diff --git a/NEWS b/NEWS
index 88d738c5..b93cdf7d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
1Mailfromd NEWS -- history of user-visible changes. 2007-05-24 1Mailfromd NEWS -- history of user-visible changes. 2007-05-27
2Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff 2Copyright (C) 2005, 2006, 2007 Sergey Poznyakoff
3See the end of file for copying conditions. 3See the end of file for copying conditions.
4 4
@@ -19,6 +19,15 @@ language. The following functions are implemented: bindtextdomain,
19dgettext, dngettext, textdomain, gettext, ngettext. In addition, 19dgettext, dngettext, textdomain, gettext, ngettext. In addition,
20macros _() and N_() are also provided. 20macros _() and N_() are also provided.
21 21
22* GNU Emacs MFL Mode
23
24This release comes with the file `mfl-mode.el', providing MFL mode for
25GNU Emacs. This mode facilitates editing MFL source files. By
26default, the new mode is installed whenever configure determines the
27presense of GNU Emacs on your machine. See the documentation, node
28`Using MFL Mode' for the detailed discussion of this mode including
29customization information.
30
22* Input files are preprocessed before compilation. Default preprocessor is 31* Input files are preprocessed before compilation. Default preprocessor is
23 M4, but this can be changed (or disabled) at configuration time (see 32 M4, but this can be changed (or disabled) at configuration time (see
24 `DEFAULT_PREPROCESSOR' variable and `--with-preprocessor' command 33 `DEFAULT_PREPROCESSOR' variable and `--with-preprocessor' command
diff --git a/doc/mailfromd.texi b/doc/mailfromd.texi
index 4b2f14ac..30f542c3 100644
--- a/doc/mailfromd.texi
+++ b/doc/mailfromd.texi
@@ -97,6 +97,7 @@ documents @command{mailfromd} Version @value{VERSION}.
97* Building:: Building the Package. 97* Building:: Building the Package.
98* Tutorial:: Mailfromd Tutorial. 98* Tutorial:: Mailfromd Tutorial.
99* MFL:: The Mail Filtering Language. 99* MFL:: The Mail Filtering Language.
100* Using MFL Mode:: Using the GNU Emacs MFL Mode.
100* Mailfromd Configuration:: Configuring @command{mailfromd}. 101* Mailfromd Configuration:: Configuring @command{mailfromd}.
101* Sendmail Configuration:: Configuring Sendmail to use @command{mailfromd}. 102* Sendmail Configuration:: Configuring Sendmail to use @command{mailfromd}.
102* mtasim:: An @acronym{MTA} simulator. 103* mtasim:: An @acronym{MTA} simulator.
@@ -3274,7 +3275,7 @@ used as a literal, or to require the corresponding module
3274(@pxref{Modules}) (or include the source file directly, 3275(@pxref{Modules}) (or include the source file directly,
3275@pxref{include}), if it is indeed a function name. 3276@pxref{include}), if it is indeed a function name.
3276 3277
3277@node MFL, Mailfromd Configuration, Tutorial, Top 3278@node MFL, Using MFL Mode, Tutorial, Top
3278@chapter Mail Filtering Language 3279@chapter Mail Filtering Language
3279@cindex MFL 3280@cindex MFL
3280@cindex mail filtering language 3281@cindex mail filtering language
@@ -9552,7 +9553,80 @@ are keywords in @code{on} context:
9552@item poll 9553@item poll
9553@end itemize 9554@end itemize
9554 9555
9555@node Mailfromd Configuration, Sendmail Configuration, MFL, Top 9556@node Using MFL Mode, Mailfromd Configuration, MFL, Top
9557@chapter Using the GNU Emacs MFL Mode
9558@UNREVISED{}
9559@cindex Emacs, @acronym{MFL} mode
9560@cindex GNU Emacs, @acronym{MFL} mode
9561@cindex @acronym{MFL} mode, GNU Emacs
9562 @acronym{MFL} sources are usual @acronym{ASCII} files and you may
9563edit them with any editor you like. However, the best choice for this
9564job (as well as for many others) is, without doubt, GNU Emacs. To ease
9565the work of editing script files, the @command{mailfromd} package
9566provides a special Emacs mode, called @acronym{MFL} mode.
9567
9568@flindex mfl-mode.el
9569@flindex site-start.el
9570@flindex ~/.emacs
9571@cindex Enabling @acronym{MFL} mode
9572@cindex @acronym{MFL} mode, enabling
9573@cindex MFL mode,
9574 The elisp source file providing this mode, @file{mfl-mode.el}, is
9575installed automatically, provided that GNU Emacs is present on your
9576machine. To enable the mode, add the following to your Emacs setup
9577file (either system-wide @file{site-start.el}, or your personal one,
9578@file{~/.emacs}):
9579
9580@smalllisp
9581@group
9582(autoload 'mfl-mode "mfl-mode")
9583(setq auto-mode-alist (append auto-mode-alist
9584 '(("/usr/local/etc/mailfromd.rc" . mfl-mode)
9585 ("\\.mf$" . mfl-mode))))
9586@end group
9587@end smalllisp
9588
9589 The first line loads the @acronym{MFL} mode, and the second one
9590tells Emacs to apply it to the file @file{/usr/local/etc/mailfromd.rc}
9591(of course, you should replace @file{/usr/local/etc/} with the exact
9592location, where your main filter script file is installed), and to any
9593file whose name ends with a @samp{.mf} suffix.
9594
9595 @acronym{MFL} mode provides automatic indentation and syntax
9596highlighting for @acronym{MFL} sources.
9597
9598@cindex Finding function definition
9599@cindex Navigating through function definitions
9600 The mode provides two special commands that help navigate through
9601the complex filter scripts:
9602
9603@table @kbd
9604@item C-M-a
9605Move to the beginning of current function or handler definition.
9606
9607@item C-M-e
9608Move to the end of current function or handler definition.
9609@end table
9610
9611 Here, @dfn{current function or handler} means the one within which
9612your cursor currently stays.
9613
9614 You can use @kbd{C-M-e} repeatedly to walk through all function
9615and handler definitions in your script files. Similarly, repeatedly
9616pressing @kbd{C-M-a} will visit all the definitions in the opposite
9617direction (from the last up to the very first one).
9618
9619@cindex Verifying script syntax
9620 Another special command, @kbd{C-c C-c}, allows to to verify the
9621syntax of your script file. This command runs @command{mailfromd} in
9622syntax check mode (@pxref{Testing Filter Scripts}) and displays its
9623output in a secondary window, which allows to navigate through
9624eventual diagnostic messages and to jump to the source locations
9625described by them.
9626
9627
9628
9629@node Mailfromd Configuration, Sendmail Configuration, Using MFL Mode, Top
9556@chapter Configuring @command{mailfromd} 9630@chapter Configuring @command{mailfromd}
9557 9631
9558 In the simplest case you will be able to startup 9632 In the simplest case you will be able to startup
diff --git a/elisp/mfl-mode.el b/elisp/mfl-mode.el
index 5c66edc6..aadcab08 100644
--- a/elisp/mfl-mode.el
+++ b/elisp/mfl-mode.el
@@ -29,6 +29,12 @@
29;; Install the file mfl-mode.elc (and, optionally, mfl-mode.el) to 29;; Install the file mfl-mode.elc (and, optionally, mfl-mode.el) to
30;; any directory in your Emacs load-path. 30;; any directory in your Emacs load-path.
31 31
32;; Customization:
33;; To your .emacs or site-start.el add: