Skip to content

Commit

Permalink
quote_regexp -> quote_regex
Browse files Browse the repository at this point in the history
  • Loading branch information
flatcap committed Feb 1, 2018
1 parent 118ebdc commit 1262204
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -951,9 +951,9 @@
* Features
- nntp: use safe_{fopen,fclose}
- nntp: fix resource leak
- forgotten-attachment: Ignore lines matching quote_regexp.
- forgotten-attachment: Ignore lines matching quote_regex.
- forgotten-attachment: Fix checking logic.
- forgotten-attachment: Update docs regarding $quote_regexp.
- forgotten-attachment: Update docs regarding $quote_regex.
- notmuch: Add a fake "Folder" header to viewed emails
- sidebar: consider description when using whitelist
- skip-quoted: skip to body
Expand Down
2 changes: 1 addition & 1 deletion contrib/sample.neomuttrc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ set postponed=+postponed # mailbox to store postponed messages in
#set print=ask-yes # ask me if I really want to print messages
set print_command=/bin/false # how to print things (I like to save trees)
set noprompt_after # ask me for a command after the external pager exits
#set quote_regexp="^ *[a-zA-Z]*[>:#}]" # how to catch quoted text
#set quote_regex="^ *[a-zA-Z]*[>:#}]" # how to catch quoted text
set read_inc=25 # show progress when reading a mailbox
#set recall # prompt to recall postponed messages
set record=+outbox # default location to save outgoing mail
Expand Down
2 changes: 1 addition & 1 deletion contrib/sample.neomuttrc-tlr
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ set print=ask-no # Don't waste paper
set print_command="enscript -2Gr -Email" # Two columns, landscape, fancy header.
set print_split=yes # Invoke enscript once per message
set quit=yes # Don't ask me whether or not I want to quit.
set quote_regexp="^ *[a-zA-Z]*[>|][>:|]*" # Recognize quotes in the pager.
set quote_regex="^ *[a-zA-Z]*[>|][>:|]*" # Recognize quotes in the pager.
set read_inc=50 # Progress indicator when reading folders.
set recall=ask-no # When I say "compose", ask me whether I want to continue
# composing a postponed message.
Expand Down
6 changes: 3 additions & 3 deletions doc/manual.xml.head
Original file line number Diff line number Diff line change
Expand Up @@ -2254,7 +2254,7 @@ color sidebar_divider color8 default
<anchor id="toggle-quoted" />(default: T)</term>
<listitem>
<para>The pager uses the
<link linkend="quote-regexp">$quote_regexp</link> variable to
<link linkend="quote-regex">$quote_regex</link> variable to
detect quoted text when displaying the body of the message. This
function toggles the display of the quoted material in the
message. It is particularly useful when being interested in just
Expand Down Expand Up @@ -4053,7 +4053,7 @@ folder-hook work "set sort=threads"
</listitem>
<listitem>
<para>quoted (text matching
<link linkend="quote-regexp">$quote_regexp</link> in the body of a
<link linkend="quote-regex">$quote_regex</link> in the body of a
message)</para>
</listitem>
<listitem>
Expand Down Expand Up @@ -10748,7 +10748,7 @@ set smime_default_key = "SMIME-KEY"
certain keyword but there are no attachments added. This is meant to
ensure that the user does not forget to attach a file after promising
to do so in the mail. The attachment keyword will not be scanned in
text matched by <link linkend="quote-regexp">$quote_regexp</link>.
text matched by <link linkend="quote-regex">$quote_regex</link>.
</para>
</sect2>

Expand Down
2 changes: 1 addition & 1 deletion globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ WHERE char *NmQueryWindowCurrentSearch;
/* These variables are backing for config items */
WHERE struct Regex *GecosMask;
WHERE struct Regex *Mask;
WHERE struct Regex *QuoteRegexp;
WHERE struct Regex *QuoteRegex;
WHERE struct Regex *ReplyRegexp;
WHERE struct Regex *Smileys;

Expand Down
5 changes: 3 additions & 2 deletions init.h
Original file line number Diff line number Diff line change
Expand Up @@ -2817,7 +2817,7 @@ struct Option MuttVars[] = {
** have no effect, and if it is set to \fIask-yes\fP or \fIask-no\fP, you are
** prompted for confirmation when you try to quit.
*/
{ "quote_regexp", DT_REGEX, R_PAGER, UL &QuoteRegexp, UL "^([ \t]*[|>:}#])+" },
{ "quote_regex", DT_REGEX, R_PAGER, UL &QuoteRegex, UL "^([ \t]*[|>:}#])+" },
/*
** .pp
** A regular expression used in the internal pager to determine quoted
Expand Down Expand Up @@ -3411,7 +3411,7 @@ struct Option MuttVars[] = {
/*
** .pp
** The \fIpager\fP uses this variable to catch some common false
** positives of $$quote_regexp, most notably smileys and not consider
** positives of $$quote_regex, most notably smileys and not consider
** a line quoted text if it also matches $$smileys. This mostly
** happens at the beginning of a line.
*/
Expand Down Expand Up @@ -4406,6 +4406,7 @@ struct Option MuttVars[] = {
{ "pgp_verify_sig", DT_SYNONYM, R_NONE, UL "crypt_verify_sig", 0 },
{ "post_indent_str", DT_SYNONYM, R_NONE, UL "post_indent_string", 0 },
{ "print_cmd", DT_SYNONYM, R_NONE, UL "print_command", 0 },
{ "quote_regexp", DT_SYNONYM, R_NONE, UL "quote_regex", 0 },
{ "smime_self_encrypt_as", DT_SYNONYM, R_NONE, UL "smime_default_key", 0 },
{ "xterm_icon", DT_SYNONYM, R_NONE, UL "ts_icon_format", 0 },
{ "xterm_set_titles", DT_SYNONYM, R_NONE, UL "ts_enabled", 0 },
Expand Down
6 changes: 3 additions & 3 deletions pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ static void resolve_types(char *buf, char *raw, struct Line *line_info, int n,
}
else if (check_sig(buf, line_info, n - 1) == 0)
line_info[n].type = MT_COLOR_SIGNATURE;
else if (QuoteRegexp && regexec(QuoteRegexp->regex, buf, 1, pmatch, 0) == 0)
else if (QuoteRegex && regexec(QuoteRegex->regex, buf, 1, pmatch, 0) == 0)
{
if (Smileys && (regexec(Smileys->regex, buf, 1, smatch, 0) == 0))
{
Expand All @@ -853,7 +853,7 @@ static void resolve_types(char *buf, char *raw, struct Line *line_info, int n,
c = buf[smatch[0].rm_so];
buf[smatch[0].rm_so] = 0;

if (QuoteRegexp && regexec(QuoteRegexp->regex, buf, 1, pmatch, 0) == 0)
if (QuoteRegex && regexec(QuoteRegex->regex, buf, 1, pmatch, 0) == 0)
{
if (q_classify && line_info[n].quote == NULL)
line_info[n].quote = classify_quote(quote_list, buf + pmatch[0].rm_so,
Expand Down Expand Up @@ -1490,7 +1490,7 @@ static int display_line(FILE *f, LOFF_T *last_pos, struct Line **line_info,
(*last)--;
goto out;
}
if (QuoteRegexp && regexec(QuoteRegexp->regex, (char *) fmt, 1, pmatch, 0) == 0)
if (QuoteRegex && regexec(QuoteRegex->regex, (char *) fmt, 1, pmatch, 0) == 0)
{
(*line_info)[n].quote =
classify_quote(quote_list, (char *) fmt + pmatch[0].rm_so,
Expand Down
4 changes: 2 additions & 2 deletions send.c
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ static int is_reply(struct Header *reply, struct Header *orig)
static int search_attach_keyword(char *filename)
{
/* Search for the regex in AttachKeyword within a file */
if (!AttachKeyword || !QuoteRegexp)
if (!AttachKeyword || !QuoteRegex)
return 0;

FILE *attf = mutt_file_fopen(filename, "r");
Expand All @@ -1250,7 +1250,7 @@ static int search_attach_keyword(char *filename)
while (!feof(attf))
{
fgets(inputline, LONG_STRING, attf);
if (regexec(QuoteRegexp->regex, inputline, 0, NULL, 0) != 0 &&
if (regexec(QuoteRegex->regex, inputline, 0, NULL, 0) != 0 &&
regexec(AttachKeyword->regex, inputline, 0, NULL, 0) == 0)
{
found = 1;
Expand Down

0 comments on commit 1262204

Please sign in to comment.