]> code.delx.au - gnu-emacs/blobdiff - lisp/mh-e/mh-scan.el
Remove compatibility with Emacs 24.3 in octave-mode
[gnu-emacs] / lisp / mh-e / mh-scan.el
index 5f0c0818714b3d8134a720d4ddd9c91389b32db3..a04ca88f3c57ee990f9176bc237485b9fcb1932a 100644 (file)
@@ -1,6 +1,7 @@
 ;;; mh-scan.el --- MH-E scan line constants and utilities
 
-;; Copyright (C) 1993, 1995, 1997, 2000-2012  Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995, 1997, 2000-2016 Free Software Foundation,
+;; Inc.
 
 ;; Author: Bill Wohler <wohler@newt.com>
 ;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -43,7 +44,7 @@
 ;; want to change the column of the notations, use the `mh-set-cmd-note'
 ;; function.
 
-(defvar mh-scan-format-mh
+(defcustom mh-scan-format-mh
   (concat
    "%4(msg)"
    "%<(cur)+%| %>"
@@ -57,7 +58,7 @@
    "%<(mymbox{from})%<{to}To:%14(friendly{to})%>%>"
    "%<(zero)%17(friendly{from})%>  "
    "%{subject}%<{body}<<%{body}%>")
-  "*Scan format string for MH.
+  "Scan format string for MH.
 This string is passed to the scan program via the -format
 argument.  This format is identical to the default except that
 additional hints for fontification have been added to the fifth
@@ -67,9 +68,11 @@ The values of the fifth column, in priority order, are: \"-\" if
 the message has been replied to, t if an address on the To: line
 matches one of the mailboxes of the current user, \"c\" if the Cc:
 line matches, \"b\" if the Bcc: line matches, and \"n\" if a
-non-empty Newsgroups: header is present.")
+non-empty Newsgroups: header is present."
+  :group 'mh-scan-line-formats
+  :type 'string)
 
-(defvar mh-scan-format-nmh
+(defcustom mh-scan-format-nmh
   (concat
    "%4(msg)"
    "%<(cur)+%| %>"
@@ -83,7 +86,7 @@ non-empty Newsgroups: header is present.")
    "%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>"
    "%<(zero)%17(decode(friendly{from}))%>  "
    "%(decode{subject})%<{body}<<%{body}%>")
-  "*Scan format string for nmh.
+  "Scan format string for nmh.
 This string is passed to the scan program via the -format arg.
 This format is identical to the default except that additional
 hints for fontification have been added to the fifth
@@ -93,7 +96,9 @@ The values of the fifth column, in priority order, are: \"-\" if
 the message has been replied to, t if an address on the To: field
 matches one of the mailboxes of the current user, \"c\" if the Cc:
 field matches, \"b\" if the Bcc: field matches, and \"n\" if a
-non-empty Newsgroups: field is present.")
+non-empty Newsgroups: field is present."
+  :group 'mh-scan-line-formats
+  :type 'string)
 
 \f
 
@@ -111,6 +116,22 @@ expression which matches the body text as in the default of
 not correct, the body fragment will not be highlighted with the
 face `mh-folder-body'.")
 
+(defvar mh-scan-blacklisted-msg-regexp "^\\( *[0-9]+\\)B"
+  "This regular expression matches blacklisted (spam) messages.
+
+It must match from the beginning of the line. Note that the
+default setting of `mh-folder-font-lock-keywords' expects this
+expression to contain at least one parenthesized expression which
+matches the message number as in the default of
+
+  \"^\\\\( *[0-9]+\\\\)B\".
+
+This expression includes the leading space within parenthesis
+since it looks better to highlight it as well. The highlighting
+is done with the face `mh-folder-blacklisted'. This regular
+expression should be correct as it is needed by non-fontification
+functions. See also `mh-note-blacklisted'.")
+
 (defvar mh-scan-cur-msg-number-regexp "^\\( *[0-9]+\\+\\).*"
   "This regular expression matches the current message.
 
@@ -155,7 +176,7 @@ is done with the face `mh-folder-deleted'.  This regular
 expression should be correct as it is needed by non-fontification
 functions.  See also `mh-note-deleted'.")
 
-(defvar mh-scan-good-msg-regexp  "^\\( *[0-9]+\\)[^D^0-9]"
+(defvar mh-scan-good-msg-regexp  "^\\( *[0-9]+\\)[^^DBW0-9]"
   "This regular expression matches \"good\" messages.
 
 It must match from the beginning of the line.  Note that the
@@ -163,7 +184,7 @@ default setting of `mh-folder-font-lock-keywords' expects this
 expression to contain at least one parenthesized expression which
 matches the message number as in the default of
 
-  \"^\\\\( *[0-9]+\\\\)[^D^0-9]\".
+  \"^\\\\( *[0-9]+\\\\)[^^DBW0-9]\".
 
 This expression includes the leading space within the parenthesis
 since it looks better to highlight it as well.  The highlighting
@@ -277,6 +298,22 @@ non-fontification functions.")
 This is used to eliminate error messages that are occasionally
 produced by \"inc\".")
 
+(defvar mh-scan-whitelisted-msg-regexp "^\\( *[0-9]+\\)W"
+  "This regular expression matches whitelisted (non-spam) messages.
+
+It must match from the beginning of the line. Note that the
+default setting of `mh-folder-font-lock-keywords' expects this
+expression to contain at least one parenthesized expression which
+matches the message number as in the default of
+
+  \"^\\\\( *[0-9]+\\\\)W\".
+
+This expression includes the leading space within parenthesis
+since it looks better to highlight it as well. The highlighting
+is done with the face `mh-folder-whitelisted'. This regular
+expression should be correct as it is needed by non-fontification
+functions. See also `mh-note-whitelisted'.")
+
 \f
 
 ;;; Widths, Offsets and Columns
@@ -294,11 +331,13 @@ Note that columns in Emacs start with 0.")
 (defvar mh-scan-cmd-note-width 1
   "Number of columns consumed by the cmd-note field in `mh-scan-format'.
 
-This column will have one of the values: \" \", \"D\", \"^\", \"+\", where
+This column will have one of the values: \" \", \"^\", \"D\", \"B\", \"W\", \"+\", where
 
   \" \" is the default value,
+  \"^\" is the `mh-note-refiled' character,
   \"D\" is the `mh-note-deleted' character,
-  \"^\" is the `mh-note-refiled' character, and
+  \"B\" is the `mh-note-blacklisted' character,
+  \"W\" is the `mh-note-whitelisted' character, and
   \"+\" is the `mh-note-cur' character.")
 
 (defvar mh-scan-destination-width 1
@@ -363,6 +402,10 @@ This column will only ever have spaces in it.")
 
 ;; Alphabetical.
 
+(defvar mh-note-blacklisted ?B
+  "Messages that have been blacklisted are marked by this character.
+See also `mh-scan-blacklisted-msg-regexp'.")
+
 (defvar mh-note-cur ?+
   "The current message (in MH, not in MH-E) is marked by this character.
 See also `mh-scan-cur-msg-number-regexp'.")
@@ -396,6 +439,10 @@ See also `mh-scan-refiled-msg-regexp'.")
 Messages in the \"search\" sequence are marked by this character as
 well.")
 
+(defvar mh-note-whitelisted ?W
+  "Messages that have been whitelisted are marked by this character.
+See also `mh-scan-whitelisted-msg-regexp'.")
+
 \f
 
 ;;; Utilities