From: Richard Russon Date: Wed, 24 Jan 2018 15:53:41 +0000 (+0000) Subject: quote_regexp -> quote_regex X-Git-Tag: neomutt-20180223~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1262204adcb19669ccd5cfd1774a4b055a942ff6;p=neomutt quote_regexp -> quote_regex --- diff --git a/ChangeLog.md b/ChangeLog.md index 857f3e169..f3deb7f05 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -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 diff --git a/contrib/sample.neomuttrc b/contrib/sample.neomuttrc index 48a79a5f1..32d47b017 100644 --- a/contrib/sample.neomuttrc +++ b/contrib/sample.neomuttrc @@ -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 diff --git a/contrib/sample.neomuttrc-tlr b/contrib/sample.neomuttrc-tlr index 59bdd8bd0..5f4e8fc7d 100644 --- a/contrib/sample.neomuttrc-tlr +++ b/contrib/sample.neomuttrc-tlr @@ -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. diff --git a/doc/manual.xml.head b/doc/manual.xml.head index 801349ca2..6fdc48f05 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -2254,7 +2254,7 @@ color sidebar_divider color8 default (default: T) The pager uses the - $quote_regexp variable to + $quote_regex 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 @@ -4053,7 +4053,7 @@ folder-hook work "set sort=threads" quoted (text matching - $quote_regexp in the body of a + $quote_regex in the body of a message) @@ -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 $quote_regexp. + text matched by $quote_regex. diff --git a/globals.h b/globals.h index f69ebc426..6ca14ba21 100644 --- a/globals.h +++ b/globals.h @@ -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; diff --git a/init.h b/init.h index b693f8023..460c89111 100644 --- a/init.h +++ b/init.h @@ -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 @@ -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. */ @@ -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 }, diff --git a/pager.c b/pager.c index eed2b1e35..fe8ef704d 100644 --- a/pager.c +++ b/pager.c @@ -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)) { @@ -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, @@ -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, diff --git a/send.c b/send.c index c36079b93..ef37e2974 100644 --- a/send.c +++ b/send.c @@ -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"); @@ -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;