update documentation wrt that.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
.SH DESCRIPTION
.PP
A Madmutt configuration file consists of a series of \(lqcommands\(rq.
-Each line of the file may contain one or more commands. When
-multiple commands are used, they must be separated by a semicolon
-(\(lq\fB;\fP\(rq).
+Each line of the file shall contain only one command (madmutt does
+not support commands beeing separated by semicolons [see INCOMPABILITIES WITH
+MUTT])
.PP
The hash mark, or pound sign (\(lq\fB#\fP\(rq), is used as a
\(lqcomment\(rq character. You can use it to annotate your
.\" -*-nroff-*-
+.SH INCOMPABILITIES WITH MUTT
+.PP
+.nf
+\fBsemicolons and multicommands\fP
+.fi
+.IP
+Unlike mutt, madmutt does not supports multiple commands per line. Meaning that
+semicolons (\(lq\fB;\fP\(rq) are not special characters at all, and do not need
+to be escaped anymore. Though, if you have escaped semicolons in your rc file,
+madmutt will understand them correctly. Only multiple commands must be
+rewritten, by just splitting the commands. So it's still possible to have a
+madmuttrc that mutt understands (and the reverse too).
+.IP
+The rationale is that it's quite a common character (especially in headers as
+it's the parameter separator) and that many commands per line is not a very good
+practice for readability either. And as it was sometimes special sometimes not,
+it also complicated the parsing a lot, hence the feature has been removed.
.SH SEE ALSO
.PP
.BR iconv (1),
return 0;
}
-static int parse_list (BUFFER * buf, BUFFER * s,
- unsigned long data __attribute__ ((unused)),
- BUFFER * err __attribute__ ((unused)))
+static int parse_list(BUFFER * buf, BUFFER * s, unsigned long data,
+ BUFFER * err __attribute__ ((unused)))
{
do {
mutt_extract_token (buf, s, 0);
set_option (OPTFORCEREDRAWINDEX);
}
- mutt_extract_token(buf, s,
- M_TOKEN_QUOTE | M_TOKEN_SPACE | M_TOKEN_SEMICOLON);
+ mutt_extract_token(buf, s, M_TOKEN_QUOTE | M_TOKEN_SPACE);
(*last)->addr = mutt_parse_adrlist((*last)->addr, buf->data);
if (mutt_addrlist_to_idna((*last)->addr, &estr)) {
snprintf (err->data, err->dsize,
every call to this function.
err where to write error messages */
-int mutt_parse_rc_line ( /* const */ char *line, BUFFER * token, BUFFER * err)
+int mutt_parse_rc_line (const char *line, BUFFER * token, BUFFER * err)
{
int i, r = -1;
BUFFER expn;
if ((ISSPACE(ch) && !(flags & M_TOKEN_SPACE))
|| (ch == '#' && !(flags & M_TOKEN_COMMENT))
|| (ch == '=' && (flags & M_TOKEN_EQUAL))
- || (ch == ';' && !(flags & M_TOKEN_SEMICOLON))
|| ((flags & M_TOKEN_PATTERN) && strchr("~=!|", ch)))
{
break;
int mutt_parse_hook (BUFFER *, BUFFER *, unsigned long, BUFFER *);
int mutt_parse_macro (BUFFER *, BUFFER *, unsigned long, BUFFER *);
int mutt_parse_push (BUFFER *, BUFFER *, unsigned long, BUFFER *);
-int mutt_parse_rc_line ( /* const */ char *, BUFFER *, BUFFER *);
+int mutt_parse_rc_line (const char *, BUFFER *, BUFFER *);
int mutt_parse_score (BUFFER *, BUFFER *, unsigned long, BUFFER *);
int mutt_parse_unscore (BUFFER *, BUFFER *, unsigned long, BUFFER *);
int mutt_parse_unhook (BUFFER *, BUFFER *, unsigned long, BUFFER *);
int ci_send_message (int, HEADER *, char *, CONTEXT *, HEADER *);
/* flags for mutt_extract_token() */
-#define M_TOKEN_EQUAL 1 /* treat '=' as a special */
-#define M_TOKEN_CONDENSE (1<<1) /* ^(char) to control chars (macros) */
-#define M_TOKEN_SPACE (1<<2) /* don't treat whitespace as a term */
-#define M_TOKEN_QUOTE (1<<3) /* don't interpret quotes */
-#define M_TOKEN_PATTERN (1<<4) /* !)|~ are terms (for patterns) */
-#define M_TOKEN_COMMENT (1<<5) /* don't reap comments */
-#define M_TOKEN_SEMICOLON (1<<6) /* don't treat ; as special */
+#define M_TOKEN_EQUAL (1 << 0) /* treat '=' as a special */
+#define M_TOKEN_CONDENSE (1 << 1) /* ^(char) to control chars (macros) */
+#define M_TOKEN_SPACE (1 << 2) /* don't treat whitespace as a term */
+#define M_TOKEN_PATTERN (1 << 3) /* !)|~ are terms (for patterns) */
+/* equivalent to M_TOKEN_PATTERN */
+#define M_TOKEN_COMMENT (1 << 4) /* don't reap comments */
+
+/* implies M_TOKEN_SPACE */
+#define M_TOKEN_QUOTE (1 << 5) /* don't interpret quotes */
int mutt_extract_token(BUFFER *, BUFFER *, int);