diff options
| author | Bill Wohler | 2005-10-28 01:59:12 +0000 |
|---|---|---|
| committer | Bill Wohler | 2005-10-28 01:59:12 +0000 |
| commit | e069fa61e085d8be77a7f61cf7a1a74e1aafbf7a (patch) | |
| tree | a4409ed281ba724ca89628661eac97083103bc1d | |
| parent | 3b463df01971a9d594b705a3d8564c432bd0c7ef (diff) | |
| download | emacs-e069fa61e085d8be77a7f61cf7a1a74e1aafbf7a.tar.gz emacs-e069fa61e085d8be77a7f61cf7a1a74e1aafbf7a.zip | |
* mh-customize.el (mh-adaptive-cmd-note-flag)
(mh-scan-format-file, mh-scan-prog): Sync docstrings with manual.
* mh-e.el (mh-scan-format-mh, mh-note-deleted, mh-note-refiled)
(mh-note-cur, mh-scan-good-msg-regexp)
(mh-scan-deleted-msg-regexp, mh-scan-refiled-msg-regexp)
(mh-scan-valid-regexp, mh-scan-cur-msg-number-regexp)
(mh-scan-date-regexp, mh-scan-rcpt-regexp, mh-scan-body-regexp)
(mh-scan-subject-regexp, mh-scan-format-regexp)
(mh-folder-font-lock-keywords, mh-set-cmd-note): Sync docstrings with
manual.
* mh-funcs.el (mh-note-copied): Sync docstrings with manual.
* mh-utils.el (mh-goto-msg): Use mh-scan-msg-search-regexp instead of
hard-coded string.
(mh-mail-header-separator, mh-signature-separator-regexp): Use
"regular expression" in docstring instead of regexp.
(mh-scan-msg-number-regexp)
(mh-scan-msg-overflow-regexp, mh-scan-msg-format-regexp)
(mh-scan-msg-format-string, mh-scan-msg-search-regexp)
(mh-cmd-note): Sync docstrings with manual.
| -rw-r--r-- | lisp/mh-e/ChangeLog | 23 | ||||
| -rw-r--r-- | lisp/mh-e/mh-customize.el | 52 | ||||
| -rw-r--r-- | lisp/mh-e/mh-e.el | 122 | ||||
| -rw-r--r-- | lisp/mh-e/mh-funcs.el | 2 | ||||
| -rw-r--r-- | lisp/mh-e/mh-utils.el | 39 |
5 files changed, 149 insertions, 89 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 96f743b10ba..d0dcac9c728 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,5 +1,28 @@ | |||
| 1 | 2005-10-27 Bill Wohler <wohler@newt.com> | 1 | 2005-10-27 Bill Wohler <wohler@newt.com> |
| 2 | 2 | ||
| 3 | * mh-customize.el (mh-adaptive-cmd-note-flag) | ||
| 4 | (mh-scan-format-file, mh-scan-prog): Sync docstrings with manual. | ||
| 5 | |||
| 6 | * mh-e.el (mh-scan-format-mh, mh-note-deleted, mh-note-refiled) | ||
| 7 | (mh-note-cur, mh-scan-good-msg-regexp) | ||
| 8 | (mh-scan-deleted-msg-regexp, mh-scan-refiled-msg-regexp) | ||
| 9 | (mh-scan-valid-regexp, mh-scan-cur-msg-number-regexp) | ||
| 10 | (mh-scan-date-regexp, mh-scan-rcpt-regexp, mh-scan-body-regexp) | ||
| 11 | (mh-scan-subject-regexp, mh-scan-format-regexp) | ||
| 12 | (mh-folder-font-lock-keywords, mh-set-cmd-note): Sync docstrings | ||
| 13 | with manual. | ||
| 14 | |||
| 15 | * mh-funcs.el (mh-note-copied): Sync docstrings with manual. | ||
| 16 | |||
| 17 | * mh-utils.el (mh-goto-msg): Use mh-scan-msg-search-regexp instead | ||
| 18 | of hard-coded string. | ||
| 19 | (mh-mail-header-separator, mh-signature-separator-regexp): Use | ||
| 20 | "regular expression" in docstring instead of regexp. | ||
| 21 | (mh-scan-msg-number-regexp) | ||
| 22 | (mh-scan-msg-overflow-regexp, mh-scan-msg-format-regexp) | ||
| 23 | (mh-scan-msg-format-string, mh-scan-msg-search-regexp) | ||
| 24 | (mh-cmd-note): Sync docstrings with manual. | ||
| 25 | |||
| 3 | * mh-comp.el (mh-insert-signature, mh-insert-auto-fields): | 26 | * mh-comp.el (mh-insert-signature, mh-insert-auto-fields): |
| 4 | Checkdoc fixes. | 27 | Checkdoc fixes. |
| 5 | 28 | ||
diff --git a/lisp/mh-e/mh-customize.el b/lisp/mh-e/mh-customize.el index d566250cacf..9708de52005 100644 --- a/lisp/mh-e/mh-customize.el +++ b/lisp/mh-e/mh-customize.el | |||
| @@ -959,38 +959,48 @@ default). If you need to scan just the message 200, then use the range | |||
| 959 | ;;; Scan Line Formats (:group 'mh-scan-line-formats) | 959 | ;;; Scan Line Formats (:group 'mh-scan-line-formats) |
| 960 | 960 | ||
| 961 | (defcustom mh-adaptive-cmd-note-flag t | 961 | (defcustom mh-adaptive-cmd-note-flag t |
| 962 | "*Non-nil means that the message number width is determined dynamically. | 962 | "*On means that the message number width is determined dynamically. |
| 963 | This is done once when a folder is first opened by running scan on the last | 963 | If you've created your own format to handle long message numbers, you'll be |
| 964 | message of the folder. The message number for the last message is extracted | 964 | pleased to know you no longer need it since MH-E adapts its internal format |
| 965 | and its width calculated. This width is used when calling `mh-set-cmd-note'. | 965 | based upon the largest message number if this option is on (the default). |
| 966 | 966 | ||
| 967 | If you prefer fixed-width message numbers, set this variable to nil and call | 967 | If you prefer fixed-width message numbers, turn off this option and call |
| 968 | `mh-set-cmd-note' with the width specified by the scan format in | 968 | `mh-set-cmd-note' with the width specified by your format file (see |
| 969 | `mh-scan-format-file'. For example, the default width is 4, so you would use | 969 | `mh-scan-format-file'). For example, the default width is 4, so you would use |
| 970 | \"(mh-set-cmd-note 4)\" if `mh-scan-format-file' were nil." | 970 | \"(mh-set-cmd-note 4)\"." |
| 971 | :type 'boolean | 971 | :type 'boolean |
| 972 | :group 'mh-scan-line-formats) | 972 | :group 'mh-scan-line-formats) |
| 973 | 973 | ||
| 974 | (defcustom mh-scan-format-file t | 974 | (defcustom mh-scan-format-file t |
| 975 | "Specifies the format file to pass to the scan program. | 975 | "Specifies the format file to pass to the scan program. |
| 976 | If t, the format string will be taken from the either `mh-scan-format-mh' | 976 | |
| 977 | or `mh-scan-format-nmh' depending on whether MH or nmh is in use. | 977 | The default setting for this option is \"Use MH-E scan Format\". This means |
| 978 | If nil, the default scan output will be used. | 978 | that the format string will be taken from the either `mh-scan-format-mh' or |
| 979 | 979 | `mh-scan-format-nmh' depending on whether MH or nmh (or GNU mailutils) is in | |
| 980 | If you customize the scan format, you may need to modify a few variables | 980 | use. You can also set this option to \"Use Default scan Format\" to get the |
| 981 | containing regexps that MH-E uses to identify specific portions of the output. | 981 | same output as you would get if you ran \"scan\" from the shell. If you have a |
| 982 | Use `M-x apropos RET mh-scan.*regexp' to obtain a list of these variables. You | 982 | format file that you want MH-E to use but not MH, you can set this option to |
| 983 | may also have to call `mh-set-cmd-note' with the width of your message | 983 | \"Specify a scan Format File\" and enter the name of your format file. |
| 984 | numbers. See also `mh-adaptive-cmd-note-flag'." | 984 | |
| 985 | If you change the format of the scan lines you'll need to tell MH-E how to | ||
| 986 | parse the new format. As you will see, quite a lot of variables are involved | ||
| 987 | to do that. Use \"M-x apropos RET mh-scan.*regexp\" to obtain a list of these | ||
| 988 | variables. You may also have to call `mh-set-cmd-note' to modify `mh-cmd-note' | ||
| 989 | with the column for your notations if you turn off | ||
| 990 | `mh-adaptive-cmd-note-flag'. However, you will need to set the `mh-cmd-note' | ||
| 991 | variable manually with `setq' if `mh-scan-format-file' is set to anything | ||
| 992 | other than \"Use MH-E scan Format\"." | ||
| 985 | :type '(choice (const :tag "Use MH-E scan Format" t) | 993 | :type '(choice (const :tag "Use MH-E scan Format" t) |
| 986 | (const :tag "Use Default scan Format" nil) | 994 | (const :tag "Use Default scan Format" nil) |
| 987 | (file :tag "Specify a scan Format File")) | 995 | (file :tag "Specify a scan Format File")) |
| 988 | :group 'mh-scan-line-formats) | 996 | :group 'mh-scan-line-formats) |
| 989 | 997 | ||
| 990 | (defcustom mh-scan-prog "scan" | 998 | (defcustom mh-scan-prog "scan" |
| 991 | "*Program to run to generate one-line-per-message listing of a folder. | 999 | "*Program used to scan messages. |
| 992 | Normally \"scan\" or a file name linked to scan. This file is searched | 1000 | The name of the program that generates a listing of one line per message is |
| 993 | for relative to the `mh-progs' directory unless it is an absolute pathname." | 1001 | held in this option. Unless this variable contains an absolute pathname, it is |
| 1002 | assumed to be in the `mh-progs' directory. You may link another program to | ||
| 1003 | `scan' (see \"mh-profile(5)\") to produce a different type of listing." | ||
| 994 | :type 'string | 1004 | :type 'string |
| 995 | :group 'mh-scan-line-formats) | 1005 | :group 'mh-scan-line-formats) |
| 996 | (make-variable-buffer-local 'mh-scan-prog) | 1006 | (make-variable-buffer-local 'mh-scan-prog) |
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 283499b2c66..c442947b789 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el | |||
| @@ -131,7 +131,8 @@ The string is displayed after the folder's name. nil for no annotation.") | |||
| 131 | "%<(mymbox{from})%<{to}To:%14(friendly{to})%>%>" | 131 | "%<(mymbox{from})%<{to}To:%14(friendly{to})%>%>" |
| 132 | "%<(zero)%17(friendly{from})%> " | 132 | "%<(zero)%17(friendly{from})%> " |
| 133 | "%{subject}%<{body}<<%{body}%>") | 133 | "%{subject}%<{body}<<%{body}%>") |
| 134 | "*Scan format string for MH, provided to the scan program via the -format arg. | 134 | "*Scan format string for MH. |
| 135 | This string is passed to the scan program via the -format arg. | ||
| 135 | This format is identical to the default except that additional hints for | 136 | This format is identical to the default except that additional hints for |
| 136 | fontification have been added to the fifth column (remember that in Emacs, the | 137 | fontification have been added to the fifth column (remember that in Emacs, the |
| 137 | first column is 0). | 138 | first column is 0). |
| @@ -167,88 +168,106 @@ mailboxes of the current user, `c' if the Cc: field matches, `b' if the Bcc: | |||
| 167 | field matches, and `n' if a non-empty Newsgroups: field is present.") | 168 | field matches, and `n' if a non-empty Newsgroups: field is present.") |
| 168 | 169 | ||
| 169 | (defvar mh-note-deleted ?D | 170 | (defvar mh-note-deleted ?D |
| 170 | "Deleted messages are marked by this character. | 171 | "Messages that have been deleted are marked by this character. |
| 171 | See also `mh-scan-deleted-msg-regexp'.") | 172 | See also `mh-scan-deleted-msg-regexp'.") |
| 172 | 173 | ||
| 173 | (defvar mh-note-refiled ?^ | 174 | (defvar mh-note-refiled ?^ |
| 174 | "Refiled messages are marked by this character. | 175 | "Messages that have been refiled are marked by this character. |
| 175 | See also `mh-scan-refiled-msg-regexp'.") | 176 | See also `mh-scan-refiled-msg-regexp'.") |
| 176 | 177 | ||
| 177 | (defvar mh-note-cur ?+ | 178 | (defvar mh-note-cur ?+ |
| 178 | "The current message (in MH) is marked by this character. | 179 | "The current message (in MH, not in MH-E) is marked by this character. |
| 179 | See also `mh-scan-cur-msg-number-regexp'.") | 180 | See also `mh-scan-cur-msg-number-regexp'.") |
| 180 | 181 | ||
| 181 | (defvar mh-scan-good-msg-regexp "^\\( *[0-9]+\\)[^D^0-9]" | 182 | (defvar mh-scan-good-msg-regexp "^\\( *[0-9]+\\)[^D^0-9]" |
| 182 | "This regexp specifies the scan lines that are 'good' messages. | 183 | "This regular expression matches \"good\" messages. |
| 183 | Note that the default setting of `mh-folder-font-lock-keywords' expects this | 184 | It must match from the beginning of the line. Note that the default setting of |
| 184 | expression to contain at least one parenthesized expression which matches the | 185 | `mh-folder-font-lock-keywords' expects this expression to contain at least one |
| 185 | message number as in the default of \"^\\\\( *[0-9]+\\\\)[^D^0-9]\".") | 186 | parenthesized expression which matches the message number as in the default of |
| 187 | \"^\\\\( *[0-9]+\\\\)[^D^0-9]\". This regular expression should be correct as | ||
| 188 | it is needed by non-fontifying functions.") | ||
| 186 | 189 | ||
| 187 | (defvar mh-scan-deleted-msg-regexp "^\\( *[0-9]+\\)D" | 190 | (defvar mh-scan-deleted-msg-regexp "^\\( *[0-9]+\\)D" |
| 188 | "This regexp matches deleted messages. | 191 | "This regular expression matches deleted messages. |
| 189 | Note that the default setting of `mh-folder-font-lock-keywords' expects this | 192 | It must match from the beginning of the line. Note that the default setting of |
| 190 | expression to contain at least one parenthesized expression which matches the | 193 | `mh-folder-font-lock-keywords' expects this expression to contain at least one |
| 191 | message number as in the default of \"^\\\\( *[0-9]+\\\\)D\". | 194 | parenthesized expression which matches the message number as in the default of |
| 192 | See also `mh-note-deleted'.") | 195 | \"^\\\\( *[0-9]+\\\\)D\". This regular expression should be correct as it is |
| 196 | needed by non-fontifying functions. See also `mh-note-deleted'.") | ||
| 193 | 197 | ||
| 194 | (defvar mh-scan-refiled-msg-regexp "^\\( *[0-9]+\\)\\^" | 198 | (defvar mh-scan-refiled-msg-regexp "^\\( *[0-9]+\\)\\^" |
| 195 | "This regexp matches refiled messages. | 199 | "This regular expression matches refiled messages. |
| 196 | Note that the default setting of `mh-folder-font-lock-keywords' expects this | 200 | It must match from the beginning of the line. Note that the default setting of |
| 197 | expression to contain at least one parenthesized expression which matches the | 201 | `mh-folder-font-lock-keywords' expects this expression to contain at least one |
| 198 | message number as in the default of \"^\\\\( *[0-9]+\\\\)\\\\^\". | 202 | parenthesized expression which matches the message number as in the default of |
| 199 | See also `mh-note-refiled'.") | 203 | \"^\\\\( *[0-9]+\\\\)\\\\^\". This regular expression should be correct as it |
| 204 | is needed by non-fontifying functions. See also `mh-note-refiled'.") | ||
| 200 | 205 | ||
| 201 | (defvar mh-scan-valid-regexp "^ *[0-9]" | 206 | (defvar mh-scan-valid-regexp "^ *[0-9]" |
| 202 | "This regexp matches scan lines for messages (not error messages).") | 207 | "This regular expression describes a valid scan line. |
| 208 | This is used to eliminate error messages that are occasionally produced by | ||
| 209 | \"inc\".") | ||
| 203 | 210 | ||
| 204 | (defvar mh-scan-cur-msg-number-regexp "^\\( *[0-9]+\\+\\).*" | 211 | (defvar mh-scan-cur-msg-number-regexp "^\\( *[0-9]+\\+\\).*" |
| 205 | "This regexp matches the current message. | 212 | "This regular expression matches the current message. |
| 206 | Note that the default setting of `mh-folder-font-lock-keywords' expects this | 213 | It must match from the beginning of the line. Note that the default setting of |
| 207 | expression to contain at least one parenthesized expression which matches the | 214 | `mh-folder-font-lock-keywords' expects this expression to contain at least one |
| 208 | message number as in the default of \"^\\\\( *[0-9]+\\\\+\\\\).*\". Don't | 215 | parenthesized expression which matches the message number as in the default of |
| 209 | disable this regexp as it's needed by non-fontifying functions. | 216 | \"^\\\\( *[0-9]+\\\\+\\\\).*\". This regular expression should be correct as |
| 210 | See also `mh-note-cur'.") | 217 | it is needed by non-fontifying functions. See also `mh-note-cur'.") |
| 211 | 218 | ||
| 212 | (defvar mh-scan-date-regexp "\\([0-9][0-9]/[0-9][0-9]\\)" | 219 | (defvar mh-scan-date-regexp "\\([0-9][0-9]/[0-9][0-9]\\)" |
| 213 | "This regexp matches a valid date. | 220 | "This regular expression matches a valid date. |
| 214 | Note that the default setting of `mh-folder-font-lock-keywords' expects this | 221 | It must not be anchored to the beginning or the end of the line. Note that the |
| 215 | expression to contain only one parenthesized expression which matches the date | 222 | default setting of `mh-folder-font-lock-keywords' expects this expression to |
| 216 | field as in the default of \"\\\\([0-9][0-9]/[0-9][0-9]\\\\)\"}. | 223 | contain only one parenthesized expression which matches the date field as in |
| 217 | See also `mh-scan-format-regexp'.") | 224 | the default of \"\\\\([0-9][0-9]/[0-9][0-9]\\\\)\"}. If this regular |
| 225 | expression is not correct, the date will not be highlighted. See also | ||
| 226 | `mh-scan-format-regexp'.") | ||
| 218 | 227 | ||
| 219 | (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)" | 228 | (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)" |
| 220 | "This regexp specifies the recipient in messages you sent. | 229 | "This regular expression specifies the recipient in messages you sent. |
| 221 | Note that the default setting of `mh-folder-font-lock-keywords' | 230 | Note that the default setting of `mh-folder-font-lock-keywords' |
| 222 | expects this expression to contain two parenthesized expressions. The | 231 | expects this expression to contain two parenthesized expressions. The |
| 223 | first is expected to match the `To:' that the default scan format | 232 | first is expected to match the `To:' that the default scan format |
| 224 | file generates. The second is expected to match the recipient's name | 233 | file generates. The second is expected to match the recipient's name |
| 225 | as in the default of \"\\\\(To:\\\\)\\\\(..............\\\\)\".") | 234 | as in the default of \"\\\\(To:\\\\)\\\\(..............\\\\)\". If this |
| 235 | regular expression is not correct, the recipient will not be highlighted.") | ||
| 226 | 236 | ||
| 227 | (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)" | 237 | (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)" |
| 228 | "This regexp matches the message body fragment displayed in scan lines. | 238 | "This regular expression matches the message body fragment. |
| 229 | Note that the default setting of `mh-folder-font-lock-keywords' expects this | 239 | Note that the default setting of `mh-folder-font-lock-keywords' expects this |
| 230 | expression to contain at least one parenthesized expression which matches the | 240 | expression to contain at least one parenthesized expression which matches the |
| 231 | body text as in the default of \"\\\\(<<\\\\([^\\n]+\\\\)?\\\\)\".") | 241 | body text as in the default of \"\\\\(<<\\\\([^\\n]+\\\\)?\\\\)\". If this |
| 242 | regular expression is not correct, the body fragment will not be highlighted.") | ||
| 232 | 243 | ||
| 233 | (defvar mh-scan-subject-regexp | 244 | (defvar mh-scan-subject-regexp |
| 234 | "^ *[0-9]+........[ ]*...................\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)" | 245 | "^ *[0-9]+........[ ]*...................\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)" |
| 235 | "This regexp matches the subject. | 246 | "This regular expression matches the subject. |
| 236 | Note that the default setting of `mh-folder-font-lock-keywords' expects this | 247 | It must match from the beginning of the line. Note that the default setting |
| 237 | expression to contain at least three parenthesized expressions. The first is | 248 | of `mh-folder-font-lock-keywords' expects this expression to contain at least |
| 238 | expected to match the `Re:' string, if any. The second matches an optional | 249 | three parenthesized expressions. The first is expected to match the `Re:' |
| 239 | bracketed number after `Re:', such as in `Re[2]:' (and is thus a | 250 | string, if any. The second matches an optional bracketed number after `Re:', |
| 240 | sub-expression of the first expression) and the third is expected to match | 251 | such as in `Re[2]:' (and is thus a sub-expression of the first expression) and |
| 241 | the subject line itself as in the default of \"^ *[0-9]+........[ ]*...................\\\\([Rr][Ee]\\\\(\\\\\\=[[0-9]+\\\\]\\\\)?:\\\\s-*\\\\)*\\\\([^<\\n]*\\\\)\".") | 252 | the third is expected to match the subject line itself as in the default of |
| 253 | \(broken on multiple lines for readability): | ||
| 254 | ^ *[0-9]+........[ ]*................... | ||
| 255 | \\\\([Rr][Ee]\\\\(\\\\\\=[[0-9]+\\\\]\\\\)?:\\\\s-*\\\\)* | ||
| 256 | \\\\([^<\\n]*\\\\) | ||
| 257 | This regular expression should be correct as it is needed by non-fontifying | ||
| 258 | functions.") | ||
| 242 | 259 | ||
| 243 | (defvar mh-scan-format-regexp | 260 | (defvar mh-scan-format-regexp |
| 244 | (concat "\\([bct]\\)" mh-scan-date-regexp " *\\(..................\\)") | 261 | (concat "\\([bct]\\)" mh-scan-date-regexp " *\\(..................\\)") |
| 245 | "This regexp matches the output of scan. | 262 | "This regular expression matches the output of scan. |
| 246 | Note that the default setting of `mh-folder-font-lock-keywords' expects this | 263 | Note that the default setting of `mh-folder-font-lock-keywords' expects this |
| 247 | expression to contain at least three parenthesized expressions. The first | 264 | expression to contain at least three parenthesized expressions. The first |
| 248 | should match the fontification hint, the second is found in | 265 | should match the fontification hint (see `mh-scan-format-nmh'), the second is |
| 249 | `mh-scan-date-regexp', and the third should match the user name as in the | 266 | found in `mh-scan-date-regexp', and the third should match the user name as in |
| 250 | default of \"(concat \"\\\\([bct]\\\\)\" mh-scan-date-regexp | 267 | the default of \"(concat \"\\\\([bct]\\\\)\" mh-scan-date-regexp |
| 251 | \"*\\\\(..................\\\\)\")\".") | 268 | \"*\\\\(..................\\\\)\")\". |
| 269 | If this regular expression is not correct, the notation hints and the sender | ||
| 270 | will not be highlighted.") | ||
| 252 | 271 | ||
| 253 | 272 | ||
| 254 | 273 | ||
| @@ -281,7 +300,7 @@ default of \"(concat \"\\\\([bct]\\\\)\" mh-scan-date-regexp | |||
| 281 | (list mh-scan-format-regexp | 300 | (list mh-scan-format-regexp |
| 282 | '(1 mh-folder-date-face) | 301 | '(1 mh-folder-date-face) |
| 283 | '(3 mh-folder-scan-format-face))) | 302 | '(3 mh-folder-scan-format-face))) |
| 284 | "Regexp keywords used to fontify the MH-Folder buffer.") | 303 | "Keywords (regular expressions) used to fontify the MH-Folder buffer.") |
| 285 | 304 | ||
| 286 | (defvar mh-scan-cmd-note-width 1 | 305 | (defvar mh-scan-cmd-note-width 1 |
| 287 | "Number of columns consumed by the cmd-note field in `mh-scan-format'. | 306 | "Number of columns consumed by the cmd-note field in `mh-scan-format'. |
| @@ -1701,10 +1720,13 @@ Return in the folder's buffer." | |||
| 1701 | (mh-notate-deleted-and-refiled))) | 1720 | (mh-notate-deleted-and-refiled))) |
| 1702 | 1721 | ||
| 1703 | (defun mh-set-cmd-note (width) | 1722 | (defun mh-set-cmd-note (width) |
| 1704 | "Set `mh-cmd-note' to WIDTH characters (minimum of 2). | 1723 | "Set `mh-cmd-note' to WIDTH (minimum of 2). |
| 1724 | |||
| 1725 | If `mh-scan-format-file' is set to \"Use Default scan Format\" or \"Specify a | ||
| 1726 | scan Format File\", then this function will NOT update `mh-cmd-note'. In these | ||
| 1727 | cases, the user should change `mh-cmd-note' with `setq' if necessary. | ||
| 1705 | 1728 | ||
| 1706 | If `mh-scan-format-file' specifies nil or a filename, then this function | 1729 | Note that columns in Emacs start with 0." |
| 1707 | will NOT update `mh-cmd-note'." | ||
| 1708 | ;; Add one to the width to always have whitespace in column zero. | 1730 | ;; Add one to the width to always have whitespace in column zero. |
| 1709 | (setq width (max (1+ width) 2)) | 1731 | (setq width (max (1+ width) 2)) |
| 1710 | (if (and (equal mh-scan-format-file t) | 1732 | (if (and (equal mh-scan-format-file t) |
diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el index 6ce1da8fe90..755be4a1560 100644 --- a/lisp/mh-e/mh-funcs.el +++ b/lisp/mh-e/mh-funcs.el | |||
| @@ -51,7 +51,7 @@ For example, '(\"-nolimit\" \"-textfield\" \"subject\") is a useful setting.") | |||
| 51 | ;;; Scan Line Formats | 51 | ;;; Scan Line Formats |
| 52 | 52 | ||
| 53 | (defvar mh-note-copied "C" | 53 | (defvar mh-note-copied "C" |
| 54 | "Copied messages are marked by this character.") | 54 | "Messages that have been copied are marked by this character.") |
| 55 | 55 | ||
| 56 | (defvar mh-note-printed "P" | 56 | (defvar mh-note-printed "P" |
| 57 | "Messages that have been printed are marked by this character.") | 57 | "Messages that have been printed are marked by this character.") |
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index 295d64ec8fd..87f521d605a 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el | |||
| @@ -86,32 +86,37 @@ of `search' in the CL package." | |||
| 86 | ;;; Scan Line Formats | 86 | ;;; Scan Line Formats |
| 87 | 87 | ||
| 88 | (defvar mh-scan-msg-number-regexp "^ *\\([0-9]+\\)" | 88 | (defvar mh-scan-msg-number-regexp "^ *\\([0-9]+\\)" |
| 89 | "This regexp is used to extract the message number from a scan line. | 89 | "This regular expression extracts the message number. |
| 90 | Note that the message number must be placed in a parenthesized expression as | 90 | It must match from the beginning of the line. Note that the message number |
| 91 | in the default of \"^ *\\\\([0-9]+\\\\)\".") | 91 | must be placed in a parenthesized expression as in the default of |
| 92 | \"^ *\\\\([0-9]+\\\\)\".") | ||
| 92 | 93 | ||
| 93 | (defvar mh-scan-msg-overflow-regexp "^[?0-9][0-9]" | 94 | (defvar mh-scan-msg-overflow-regexp "^[?0-9][0-9]" |
| 94 | "This regexp matches scan lines in which the message number overflowed.") | 95 | "This regular expression matches overflowed message numbers.") |
| 95 | 96 | ||
| 96 | (defvar mh-scan-msg-format-regexp "%\\([0-9]*\\)(msg)" | 97 | (defvar mh-scan-msg-format-regexp "%\\([0-9]*\\)(msg)" |
| 97 | "This regexp is used to find the message number width in a scan format. | 98 | "This regular expression finds the message number width in a scan format. |
| 98 | Note that the message number must be placed in a parenthesized expression as | 99 | Note that the message number must be placed in a parenthesized expression as |
| 99 | in the default of \"%\\\\([0-9]*\\\\)(msg)\".") | 100 | in the default of \"%\\\\([0-9]*\\\\)(msg)\". This variable is only consulted |
| 101 | if `mh-scan-format-file' is set to \"Use MH-E scan Format\".") | ||
| 100 | 102 | ||
| 101 | (defvar mh-scan-msg-format-string "%d" | 103 | (defvar mh-scan-msg-format-string "%d" |
| 102 | "This is a format string for width of the message number in a scan format. | 104 | "This is a format string for width of the message number in a scan format. |
| 103 | Use `0%d' for zero-filled message numbers.") | 105 | Use `0%d' for zero-filled message numbers. This variable is only consulted if |
| 106 | `mh-scan-format-file' is set to \"Use MH-E scan Format\".") | ||
| 104 | 107 | ||
| 105 | (defvar mh-scan-msg-search-regexp "^[^0-9]*%d[^0-9]" | 108 | (defvar mh-scan-msg-search-regexp "^[^0-9]*%d[^0-9]" |
| 106 | "This format string regexp matches the scan line for a particular message. | 109 | "This regular expression matches a particular message. |
| 107 | Use `%d' to represent the location of the message number within the | 110 | It is a format string; use `%d' to represent the location of the message |
| 108 | expression as in the default of \"^[^0-9]*%d[^0-9]\".") | 111 | number within the expression as in the default of \"^[^0-9]*%d[^0-9]\".") |
| 109 | 112 | ||
| 110 | (defvar mh-cmd-note 4 | 113 | (defvar mh-cmd-note 4 |
| 111 | "This is the number of characters to skip over before inserting notation. | 114 | "Column where notations begin. |
| 112 | This variable should be set with the function `mh-set-cmd-note'. This variable | 115 | This variable should be set with the function `mh-set-cmd-note'. This variable |
| 113 | may be updated dynamically if `mh-adaptive-cmd-note-flag' is non-nil and | 116 | may be updated dynamically if `mh-adaptive-cmd-note-flag' is on and |
| 114 | `mh-scan-format-file' is t.") | 117 | `mh-scan-format-file' is set to \"Use MH-E scan Format\". |
| 118 | |||
| 119 | Note that columns in Emacs start with 0.") | ||
| 115 | (make-variable-buffer-local 'mh-cmd-note) | 120 | (make-variable-buffer-local 'mh-cmd-note) |
| 116 | 121 | ||
| 117 | (defvar mh-note-seq ?% | 122 | (defvar mh-note-seq ?% |
| @@ -133,12 +138,12 @@ This variable should not be used directly in programs. Programs should use | |||
| 133 | `mh-mail-header-separator' in `mh-letter-mode'; in other contexts, you may | 138 | `mh-mail-header-separator' in `mh-letter-mode'; in other contexts, you may |
| 134 | have to perform this initialization yourself. | 139 | have to perform this initialization yourself. |
| 135 | 140 | ||
| 136 | Do not make this a regexp as it may be the argument to `insert' and it is | 141 | Do not make this a regular expression as it may be the argument to `insert' |
| 137 | passed through `regexp-quote' before being used by functions like | 142 | and it is passed through `regexp-quote' before being used by functions like |
| 138 | `re-search-forward'.") | 143 | `re-search-forward'.") |
| 139 | 144 | ||
| 140 | (defvar mh-signature-separator-regexp "^-- $" | 145 | (defvar mh-signature-separator-regexp "^-- $" |
| 141 | "Regexp used to find signature separator. | 146 | "This regular expression matches the signature separator. |
| 142 | See `mh-signature-separator'.") | 147 | See `mh-signature-separator'.") |
| 143 | 148 | ||
| 144 | (defvar mh-signature-separator "-- \n" | 149 | (defvar mh-signature-separator "-- \n" |
| @@ -1853,7 +1858,7 @@ Non-nil third argument DONT-SHOW means not to show the message." | |||
| 1853 | (let ((point (point)) | 1858 | (let ((point (point)) |
| 1854 | (return-value t)) | 1859 | (return-value t)) |
| 1855 | (goto-char (point-min)) | 1860 | (goto-char (point-min)) |
| 1856 | (unless (re-search-forward (format "^[ ]*%s[^0-9]+" number) nil t) | 1861 | (unless (re-search-forward (format mh-scan-msg-search-regexp number) nil t) |
| 1857 | (goto-char point) | 1862 | (goto-char point) |
| 1858 | (unless no-error-if-no-message | 1863 | (unless no-error-if-no-message |
| 1859 | (error "No message %d" number)) | 1864 | (error "No message %d" number)) |