]> granicus.if.org Git - neomutt/commitdiff
restore quote_regexp and reply_regexp
authorRichard Russon <rich@flatcap.org>
Fri, 15 Sep 2017 11:12:29 +0000 (12:12 +0100)
committerRichard Russon <rich@flatcap.org>
Fri, 15 Sep 2017 11:24:27 +0000 (12:24 +0100)
I shouldn't have renamed these

ChangeLog.md
contrib/sample.neomuttrc
contrib/sample.neomuttrc-tlr
doc/manual.xml.head
doc/neomutt-syntax.vim
init.c
init.h
mutt_regex.h
pager.c
parse.c
send.c

index 7bbf9e3a47023c07a19f90fa5e9020889d01c076..6c817ee42ba1a4ead3afdd87e0cefa69e7ff110a 100644 (file)
 * Features
   - nntp: use safe_{fopen,fclose}
   - nntp: fix resource leak
-  - forgotten-attachment: Ignore lines matching quote_regex.
+  - forgotten-attachment: Ignore lines matching quote_regexp.
   - forgotten-attachment: Fix checking logic.
-  - forgotten-attachment: Update docs regarding $quote_regex.
+  - forgotten-attachment: Update docs regarding $quote_regexp.
   - notmuch: Add a fake "Folder" header to viewed emails
   - sidebar: consider description when using whitelist
   - skip-quoted: skip to body
index d0fd1b11f4f6e4df845ab5c29fa868dffe5788d7..d891400990589a8cf546d1073635677415aa5802 100644 (file)
@@ -67,12 +67,12 @@ 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_regex="^ *[a-zA-Z]*[>:#}]"  # how to catch quoted text
+#set quote_regexp="^ *[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
 set reply_to                   # always use reply-to if present
-#set reply_regex="^(re:[ \t]*)+"# how to identify replies in the subject:
+#set reply_regexp="^(re:[ \t]*)+"# how to identify replies in the subject:
 #set resolve           # move to the next message when an action is performed
 #set reverse_alias             # attempt to look up my names for people
 set reverse_name               # use my address as it appears in the message
@@ -254,12 +254,12 @@ save-hook ^judge +diplomacy
 #folder-hook mutt      'set index_format="%4C %Z %02m/%02N %-20.20F (%4l) %s"'
 #folder-hook =mutt     my_hdr Revolution: \#9 # real comment
 
-#folder-hook .         'set reply_regex="^re:[ \t]*"'
+#folder-hook .         'set reply_regexp="^re:[ \t]*"'
 
 # this mailing list prepends "[WM]" to all non reply subjects, so set
-# $reply_regex to ignore it
+# $reply_regexp to ignore it
 # Warning: May break threads for other people.
-#folder-hook +wmaker   'set reply_regex="^(re:[ \t]*)?\[WM\][ \t]*"'
+#folder-hook +wmaker   'set reply_regexp="^(re:[ \t]*)?\[WM\][ \t]*"'
 
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 #
index 40834ca71580a49026d00fe0659d917251bb090b..59bdd8bd0f0ab286cbfc8224f0e4479a68662702 100644 (file)
@@ -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_regex="^ *[a-zA-Z]*[>|][>:|]*"     # Recognize quotes in the pager.
+set   quote_regexp="^ *[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.
@@ -266,7 +266,7 @@ set   encode_from                       # "From " in the beginning of a line tri
 set   nowait_key                        # Return immediately from external programs
 set   forward_format="[fwd] %s (from: %a)"      # A different subject for forwarded messages
 set   nobeep                            # Shut up. ;-)
-set   reply_regex="^((re([\\[0-9\\]+])*|aw):[ \t]*)+[ \t]*"    # A regular expression to detect replies
+set   reply_regexp="^((re([\\[0-9\\]+])*|aw):[ \t]*)+[ \t]*"    # A regular expression to detect replies
 set   header                            # Include the message header when replying.
 set   ignore_list_reply_to              # Ignore Reply-To headers pointing to mailing lists.
 set   norfc2047_parameters              # Sometimes, I get mails which use a bogus encoding for
index 1f2a12a44c237c7a99fa3a3269db959a8c9cbe67..32b4b5afc30e8fd56299e126c9e4e09efd5ea854 100644 (file)
@@ -2203,7 +2203,7 @@ color sidebar_divider   color8  default
             <anchor id="toggle-quoted" />(default: T)</term>
             <listitem>
               <para>The pager uses the
-              <link linkend="quote-regex">$quote_regex</link> variable to
+              <link linkend="quote-regexp">$quote_regexp</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
@@ -4001,7 +4001,7 @@ folder-hook work "set sort=threads"
         </listitem>
         <listitem>
           <para>quoted (text matching
-          <link linkend="quote-regex">$quote_regex</link> in the body of a
+          <link linkend="quote-regexp">$quote_regexp</link> in the body of a
           message)</para>
         </listitem>
         <listitem>
@@ -10768,7 +10768,7 @@ set pgp_self_encrypt = "no"
         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-regex">$quote_regex</link>.
+        text matched by <link linkend="quote-regexp">$quote_regexp</link>.
         </para>
       </sect2>
 
index 96dd5bb68de2bedc44faca0bca7554d8e01d7f4f..72e4f5fdd3d661be4f1f4cf6ddc359e015f1a65d 100644 (file)
@@ -369,8 +369,8 @@ syn keyword muttrcVarStr    contained skipwhite
                        \ pgp_mime_signature_description pgp_mime_signature_filename pgp_sign_as
                        \ pgp_sort_keys pipe_sep pop_authenticators pop_host pop_pass pop_user
                        \ post_indent_string postpone_encrypt_as postponed preconnect
-                       \ print_command query_command quote_regex realname record
-                       \ reply_regex send_charset sendmail shell sidebar_delim sidebar_delim_chars
+                       \ print_command query_command quote_regexp realname record
+                       \ reply_regexp send_charset sendmail shell sidebar_delim sidebar_delim_chars
                        \ sidebar_divider_char sidebar_format sidebar_indent_string sidebar_sort_method
                        \ signature simple_search smileys smime_ca_location smime_certificates
                        \ smime_default_key smime_encrypt_with smime_keys
diff --git a/init.c b/init.c
index d755f47964aab5683caecd7f3da98f0ea79003bc..0c3c54c58c60f5728e723734a5896d48eff8c2fa 100644 (file)
--- a/init.c
+++ b/init.c
@@ -382,9 +382,9 @@ int mutt_option_set(const struct Option *val, struct Buffer *err)
 
         if (parse_regex(idx, &tmp, &err2))
         {
-          /* $reply_regex and $alternates require special treatment */
+          /* $reply_regexp and $alternates require special treatment */
           if (Context && Context->msgcount &&
-              (mutt_strcmp(MuttVars[idx].option, "reply_regex") == 0))
+              (mutt_strcmp(MuttVars[idx].option, "reply_regexp") == 0))
           {
             regmatch_t pmatch[1];
 
@@ -394,7 +394,7 @@ int mutt_option_set(const struct Option *val, struct Buffer *err)
               if (CUR_ENV && CUR_ENV->subject)
               {
                 CUR_ENV->real_subj =
-                    (regexec(ReplyRegex.regex, CUR_ENV->subject, 1, pmatch, 0)) ?
+                    (regexec(ReplyRegexp.regex, CUR_ENV->subject, 1, pmatch, 0)) ?
                         CUR_ENV->subject :
                         CUR_ENV->subject + pmatch[0].rm_eo;
               }
@@ -2789,7 +2789,7 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data,
       }
 
       if (option(OPT_ATTACH_MSG) &&
-          (mutt_strcmp(MuttVars[idx].option, "reply_regex") == 0))
+          (mutt_strcmp(MuttVars[idx].option, "reply_regexp") == 0))
       {
         snprintf(err->data, err->dsize,
                  "Operation not permitted when in attach-message mode.");
@@ -2804,9 +2804,9 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data,
       mutt_extract_token(tmp, s, 0);
 
       if (parse_regex(idx, tmp, err))
-        /* $reply_regex and $alternates require special treatment */
+        /* $reply_regexp and $alternates require special treatment */
         if (Context && Context->msgcount &&
-            (mutt_strcmp(MuttVars[idx].option, "reply_regex") == 0))
+            (mutt_strcmp(MuttVars[idx].option, "reply_regexp") == 0))
         {
           regmatch_t pmatch[1];
           int i;
@@ -2817,7 +2817,7 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data,
             if (CUR_ENV && CUR_ENV->subject)
             {
               CUR_ENV->real_subj =
-                  (regexec(ReplyRegex.regex, CUR_ENV->subject, 1, pmatch, 0)) ?
+                  (regexec(ReplyRegexp.regex, CUR_ENV->subject, 1, pmatch, 0)) ?
                       CUR_ENV->subject :
                       CUR_ENV->subject + pmatch[0].rm_eo;
             }
diff --git a/init.h b/init.h
index 4f029f39c887f487073f2f73755241ecb34f4d59..583a7b37af218227576ae73c798a7f6d0e25ca1b 100644 (file)
--- a/init.h
+++ b/init.h
@@ -2865,7 +2865,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_regex",     DT_REGEX,   R_PAGER, UL &QuoteRegex, UL "^([ \t]*[|>:}#])+" },
+  { "quote_regexp",     DT_REGEX,   R_PAGER, UL &QuoteRegexp, UL "^([ \t]*[|>:}#])+" },
   /*
   ** .pp
   ** A regular expression used in the internal pager to determine quoted
@@ -2966,7 +2966,7 @@ struct Option MuttVars[] = {
   ** .pp
   ** Also see $$wrap.
   */
-  { "reply_regex",     DT_REGEX,   R_INDEX|R_RESORT, UL &ReplyRegex, UL "^(re([\\[0-9\\]+])*|aw):[ \t]*" },
+  { "reply_regexp",     DT_REGEX,   R_INDEX|R_RESORT, UL &ReplyRegexp, UL "^(re([\\[0-9\\]+])*|aw):[ \t]*" },
   /*
   ** .pp
   ** A regular expression used to recognize reply messages when threading
@@ -3446,7 +3446,7 @@ struct Option MuttVars[] = {
   /*
   ** .pp
   ** The \fIpager\fP uses this variable to catch some common false
-  ** positives of $$quote_regex, most notably smileys and not consider
+  ** positives of $$quote_regexp, most notably smileys and not consider
   ** a line quoted text if it also matches $$smileys. This mostly
   ** happens at the beginning of a line.
   */
index b65686eb4bddb578492db105c10ee2dc28c23644..e2e097aa4387b6e6462a391caac6f5fe756d48f3 100644 (file)
@@ -71,8 +71,8 @@ struct ReplaceList
 };
 
 WHERE struct Regex Mask;
-WHERE struct Regex QuoteRegex;
-WHERE struct Regex ReplyRegex;
+WHERE struct Regex QuoteRegexp;
+WHERE struct Regex ReplyRegexp;
 WHERE struct Regex Smileys;
 WHERE struct Regex GecosMask;
 
diff --git a/pager.c b/pager.c
index 3f6f528b3247b72e474b87bde4f16864dd5bd599..4ccc74a0ea3c1d3f2e0067e3fb29508897895015 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -847,7 +847,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 (regexec((regex_t *) QuoteRegex.regex, buf, 1, pmatch, 0) == 0)
+  else if (regexec((regex_t *) QuoteRegexp.regex, buf, 1, pmatch, 0) == 0)
   {
     if (regexec((regex_t *) Smileys.regex, buf, 1, smatch, 0) == 0)
     {
@@ -859,7 +859,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 (regexec((regex_t *) QuoteRegex.regex, buf, 1, pmatch, 0) == 0)
+        if (regexec((regex_t *) QuoteRegexp.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 (regexec((regex_t *) QuoteRegex.regex, (char *) fmt, 1, pmatch, 0) != 0)
+    if (regexec((regex_t *) QuoteRegexp.regex, (char *) fmt, 1, pmatch, 0) != 0)
       goto out;
     (*line_info)[n].quote =
         classify_quote(quote_list, (char *) fmt + pmatch[0].rm_so,
diff --git a/parse.c b/parse.c
index 3b8966e1a003b1dc204b27c896caa934f62d384f..a0fa2410117cff1d4e4bd915299b646b430221e5 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -1267,7 +1267,7 @@ struct Envelope *mutt_read_rfc822_header(FILE *f, struct Header *hdr,
 
       rfc2047_decode(&e->subject);
 
-      if (regexec(ReplyRegex.regex, e->subject, 1, pmatch, 0) == 0)
+      if (regexec(ReplyRegexp.regex, e->subject, 1, pmatch, 0) == 0)
         e->real_subj = e->subject + pmatch[0].rm_eo;
       else
         e->real_subj = e->subject;
diff --git a/send.c b/send.c
index bf3733d74c3e04b933e907c87ca41941fc07bc4d..d41a161ea49dbc5bede25643d83300f51c543265 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1284,7 +1284,7 @@ static int search_attach_keyword(char *filename)
   while (!feof(attf))
   {
     fgets(inputline, LONG_STRING, attf);
-    if (regexec(QuoteRegex.regex, inputline, 0, NULL, 0) != 0 &&
+    if (regexec(QuoteRegexp.regex, inputline, 0, NULL, 0) != 0 &&
         regexec(AttachKeyword.regex, inputline, 0, NULL, 0) == 0)
     {
       found = 1;