blob: 8eadf5659f7bf8a64222f6c6ac49112a3382f206 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
% This macro demonstrates the use of the post_filter_hook
% In your .slrnrc, add the line `interpret "/usr/local/share/examples/spellutils/aspell.sl"'
%static
define aspell_file (file)
{
variable cmd = "/usr/local/bin/newsbody -qs -k Subject -n '%s' -p /usr/local/bin/aspell -- -c -x %%f";
() = system (sprintf (cmd, file));
}
define post_filter_hook (file)
{
variable rsp;
variable cmd;
forever
{
rsp = get_response ("NnAa",
"Select Filter? \001None, \001Aspell");
switch (rsp)
{
case 'a' or case 'A':
aspell_file (file);
}
{
case 'n' or case 'N':
return;
}
}
}
|