Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e9c89e

Browse files
committed
Some nits.
Fixed quoting in third paragraph of the findmatch() description.
1 parent ac8f91a commit 9e9c89e

2 files changed

Lines changed: 20 additions & 14 deletions

File tree

Doc/lib/libmailcap.tex

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,19 @@ \section{Standard Module \sectcode{mailcap}}
88
types. (The name ``mailcap'' is derived from the phrase ``mail
99
capability''.) For example, a mailcap file might contain a line like
1010
\samp{video/mpeg; xmpeg \%s}. Then, if the user encounters an email
11-
message or Web document with the MIME type video/mpeg, \code{\%s} will be
12-
replaced by a filename (usually one belonging to a temporary file) and
13-
the xmpeg program can be automatically started to view the file.
11+
message or Web document with the MIME type \mimetype{video/mpeg},
12+
\samp{\%s} will be replaced by a filename (usually one belonging to a
13+
temporary file) and the \program{xmpeg} program can be automatically
14+
started to view the file.
1415

1516
The mailcap format is documented in \rfc{1524}, ``A User Agent
1617
Configuration Mechanism For Multimedia Mail Format Information,'' but
1718
is not an Internet standard. However, mailcap files are supported on
1819
most \UNIX{} systems.
1920

20-
\begin{funcdesc}{findmatch}{caps, MIMEtype, key, filename, plist}
21+
\begin{funcdesc}{findmatch}{caps, MIMEtype%
22+
\optional{, key\optional{,
23+
filename\optional{, plist}}}}
2124
Return a 2-tuple; the first element is a string containing the command
2225
line to be executed
2326
(which can be passed to \code{os.system()}), and the second element is
@@ -32,9 +35,9 @@ \section{Standard Module \sectcode{mailcap}}
3235
existing body data. See \rfc{1524} for a complete list of these
3336
fields.
3437

35-
\var{filename} is the filename to be substituted for \%s in the
38+
\var{filename} is the filename to be substituted for \samp{\%s} in the
3639
command line; the default value is
37-
\file{/dev/null} which is almost certainly not what you want, so
40+
\code{'/dev/null'} which is almost certainly not what you want, so
3841
usually you'll override it by specifying a filename.
3942

4043
\var{plist} can be a list containing named parameters; the default
@@ -43,7 +46,7 @@ \section{Standard Module \sectcode{mailcap}}
4346
parameter's value. Mailcap entries can contain
4447
named parameters like \code{\%\{foo\}}, which will be replaced by the
4548
value of the parameter named 'foo'. For example, if the command line
46-
\samp{showpartial \%\{id\} \%\{number\} \%\{total\}}
49+
\samp{showpartial \%\{id\}\ \%\{number\}\ \%\{total\}}
4750
was in a mailcap file, and \var{plist} was set to \code{['id=1',
4851
'number=2', 'total=3']}, the resulting command line would be
4952
\code{"showpartial 1 2 3"}.

Doc/libmailcap.tex

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,19 @@ \section{Standard Module \sectcode{mailcap}}
88
types. (The name ``mailcap'' is derived from the phrase ``mail
99
capability''.) For example, a mailcap file might contain a line like
1010
\samp{video/mpeg; xmpeg \%s}. Then, if the user encounters an email
11-
message or Web document with the MIME type video/mpeg, \code{\%s} will be
12-
replaced by a filename (usually one belonging to a temporary file) and
13-
the xmpeg program can be automatically started to view the file.
11+
message or Web document with the MIME type \mimetype{video/mpeg},
12+
\samp{\%s} will be replaced by a filename (usually one belonging to a
13+
temporary file) and the \program{xmpeg} program can be automatically
14+
started to view the file.
1415

1516
The mailcap format is documented in \rfc{1524}, ``A User Agent
1617
Configuration Mechanism For Multimedia Mail Format Information,'' but
1718
is not an Internet standard. However, mailcap files are supported on
1819
most \UNIX{} systems.
1920

20-
\begin{funcdesc}{findmatch}{caps, MIMEtype, key, filename, plist}
21+
\begin{funcdesc}{findmatch}{caps, MIMEtype%
22+
\optional{, key\optional{,
23+
filename\optional{, plist}}}}
2124
Return a 2-tuple; the first element is a string containing the command
2225
line to be executed
2326
(which can be passed to \code{os.system()}), and the second element is
@@ -32,9 +35,9 @@ \section{Standard Module \sectcode{mailcap}}
3235
existing body data. See \rfc{1524} for a complete list of these
3336
fields.
3437

35-
\var{filename} is the filename to be substituted for \%s in the
38+
\var{filename} is the filename to be substituted for \samp{\%s} in the
3639
command line; the default value is
37-
\file{/dev/null} which is almost certainly not what you want, so
40+
\code{'/dev/null'} which is almost certainly not what you want, so
3841
usually you'll override it by specifying a filename.
3942

4043
\var{plist} can be a list containing named parameters; the default
@@ -43,7 +46,7 @@ \section{Standard Module \sectcode{mailcap}}
4346
parameter's value. Mailcap entries can contain
4447
named parameters like \code{\%\{foo\}}, which will be replaced by the
4548
value of the parameter named 'foo'. For example, if the command line
46-
\samp{showpartial \%\{id\} \%\{number\} \%\{total\}}
49+
\samp{showpartial \%\{id\}\ \%\{number\}\ \%\{total\}}
4750
was in a mailcap file, and \var{plist} was set to \code{['id=1',
4851
'number=2', 'total=3']}, the resulting command line would be
4952
\code{"showpartial 1 2 3"}.

0 commit comments

Comments
 (0)