diff options
| author | Bill Wohler | 2005-12-23 07:40:40 +0000 |
|---|---|---|
| committer | Bill Wohler | 2005-12-23 07:40:40 +0000 |
| commit | 2dcf34f9ca6c16817a902fb7340af06708702781 (patch) | |
| tree | 01f09bebb644d9978078e24521e698132ed014c7 | |
| parent | d169946261347a11f80680f4deda7d0a62816f39 (diff) | |
| download | emacs-2dcf34f9ca6c16817a902fb7340af06708702781.tar.gz emacs-2dcf34f9ca6c16817a902fb7340af06708702781.zip | |
Follow Emacs coding conventions. Use default setting of
emacs-lisp-docstring-fill-column which is 65.
| -rw-r--r-- | lisp/mh-e/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/mh-e/mh-acros.el | 31 | ||||
| -rw-r--r-- | lisp/mh-e/mh-alias.el | 83 | ||||
| -rw-r--r-- | lisp/mh-e/mh-comp.el | 460 | ||||
| -rw-r--r-- | lisp/mh-e/mh-customize.el | 1294 | ||||
| -rw-r--r-- | lisp/mh-e/mh-e.el | 779 | ||||
| -rw-r--r-- | lisp/mh-e/mh-funcs.el | 95 | ||||
| -rw-r--r-- | lisp/mh-e/mh-gnus.el | 12 | ||||
| -rw-r--r-- | lisp/mh-e/mh-identity.el | 47 | ||||
| -rw-r--r-- | lisp/mh-e/mh-index.el | 368 | ||||
| -rw-r--r-- | lisp/mh-e/mh-init.el | 37 | ||||
| -rw-r--r-- | lisp/mh-e/mh-junk.el | 137 | ||||
| -rw-r--r-- | lisp/mh-e/mh-mime.el | 263 | ||||
| -rw-r--r-- | lisp/mh-e/mh-pick.el | 145 | ||||
| -rw-r--r-- | lisp/mh-e/mh-print.el | 89 | ||||
| -rw-r--r-- | lisp/mh-e/mh-seq.el | 303 | ||||
| -rw-r--r-- | lisp/mh-e/mh-speed.el | 33 | ||||
| -rw-r--r-- | lisp/mh-e/mh-utils.el | 425 |
18 files changed, 2518 insertions, 2086 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 613fcc49cd4..f6927979963 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2005-12-22 Bill Wohler <wohler@newt.com> | 1 | 2005-12-22 Bill Wohler <wohler@newt.com> |
| 2 | 2 | ||
| 3 | Follow Emacs coding conventions. Use default setting of | ||
| 4 | emacs-lisp-docstring-fill-column which is 65. | ||
| 5 | |||
| 3 | * mh-alias.el (mh-alias-reload): Sync docstrings with manual. | 6 | * mh-alias.el (mh-alias-reload): Sync docstrings with manual. |
| 4 | 7 | ||
| 5 | * mh-comp.el (mh-letter-mode): Use 60 column width. | 8 | * mh-comp.el (mh-letter-mode): Use 60 column width. |
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el index 5523f1cf46b..16c42d90634 100644 --- a/lisp/mh-e/mh-acros.el +++ b/lisp/mh-e/mh-acros.el | |||
| @@ -49,8 +49,9 @@ | |||
| 49 | (defmacro mh-require-cl () | 49 | (defmacro mh-require-cl () |
| 50 | "Macro to load `cl' if needed. | 50 | "Macro to load `cl' if needed. |
| 51 | Some versions of `cl' produce code for the expansion of | 51 | Some versions of `cl' produce code for the expansion of |
| 52 | \(setf (gethash ...) ...) that uses functions in `cl' at run time. This macro | 52 | \(setf (gethash ...) ...) that uses functions in `cl' at run |
| 53 | recognizes that and loads `cl' where appropriate." | 53 | time. This macro recognizes that and loads `cl' where |
| 54 | appropriate." | ||
| 54 | (if (eq (car (macroexpand '(setf (gethash foo bar) baz))) 'cl-puthash) | 55 | (if (eq (car (macroexpand '(setf (gethash foo bar) baz))) 'cl-puthash) |
| 55 | `(require 'cl) | 56 | `(require 'cl) |
| 56 | `(eval-when-compile (require 'cl)))) | 57 | `(eval-when-compile (require 'cl)))) |
| @@ -75,16 +76,16 @@ recognizes that and loads `cl' where appropriate." | |||
| 75 | 76 | ||
| 76 | (defmacro mh-make-local-hook (hook) | 77 | (defmacro mh-make-local-hook (hook) |
| 77 | "Make HOOK local if needed. | 78 | "Make HOOK local if needed. |
| 78 | XEmacs and versions of GNU Emacs before 21.1 require `make-local-hook' to be | 79 | XEmacs and versions of GNU Emacs before 21.1 require |
| 79 | called." | 80 | `make-local-hook' to be called." |
| 80 | (when (and (fboundp 'make-local-hook) | 81 | (when (and (fboundp 'make-local-hook) |
| 81 | (not (get 'make-local-hook 'byte-obsolete-info))) | 82 | (not (get 'make-local-hook 'byte-obsolete-info))) |
| 82 | `(make-local-hook ,hook))) | 83 | `(make-local-hook ,hook))) |
| 83 | 84 | ||
| 84 | (defmacro mh-mark-active-p (check-transient-mark-mode-flag) | 85 | (defmacro mh-mark-active-p (check-transient-mark-mode-flag) |
| 85 | "A macro that expands into appropriate code in XEmacs and nil in GNU Emacs. | 86 | "A macro that expands into appropriate code in XEmacs and nil in GNU Emacs. |
| 86 | In GNU Emacs if CHECK-TRANSIENT-MARK-MODE-FLAG is non-nil then check if | 87 | In GNU Emacs if CHECK-TRANSIENT-MARK-MODE-FLAG is non-nil then |
| 87 | variable `transient-mark-mode' is active." | 88 | check if variable `transient-mark-mode' is active." |
| 88 | (cond ((featurep 'xemacs) ;XEmacs | 89 | (cond ((featurep 'xemacs) ;XEmacs |
| 89 | `(and (boundp 'zmacs-regions) zmacs-regions (region-active-p))) | 90 | `(and (boundp 'zmacs-regions) zmacs-regions (region-active-p))) |
| 90 | ((not check-transient-mark-mode-flag) ;GNU Emacs | 91 | ((not check-transient-mark-mode-flag) ;GNU Emacs |
| @@ -95,12 +96,14 @@ variable `transient-mark-mode' is active." | |||
| 95 | 96 | ||
| 96 | (defmacro mh-defstruct (name-spec &rest fields) | 97 | (defmacro mh-defstruct (name-spec &rest fields) |
| 97 | "Replacement for `defstruct' from the `cl' package. | 98 | "Replacement for `defstruct' from the `cl' package. |
| 98 | The `defstruct' in the `cl' library produces compiler warnings, and generates | 99 | The `defstruct' in the `cl' library produces compiler warnings, |
| 99 | code that uses functions present in `cl' at run-time. This is a partial | 100 | and generates code that uses functions present in `cl' at |
| 100 | replacement, that avoids these issues. | 101 | run-time. This is a partial replacement, that avoids these |
| 101 | 102 | issues. | |
| 102 | NAME-SPEC declares the name of the structure, while FIELDS describes the | 103 | |
| 103 | various structure fields. Lookup `defstruct' for more details." | 104 | NAME-SPEC declares the name of the structure, while FIELDS |
| 105 | describes the various structure fields. Lookup `defstruct' for | ||
| 106 | more details." | ||
| 104 | (let* ((struct-name (if (atom name-spec) name-spec (car name-spec))) | 107 | (let* ((struct-name (if (atom name-spec) name-spec (car name-spec))) |
| 105 | (conc-name (or (and (consp name-spec) | 108 | (conc-name (or (and (consp name-spec) |
| 106 | (cadr (assoc :conc-name (cdr name-spec)))) | 109 | (cadr (assoc :conc-name (cdr name-spec)))) |
| @@ -136,8 +139,8 @@ various structure fields. Lookup `defstruct' for more details." | |||
| 136 | 139 | ||
| 137 | (defmacro mh-assoc-ignore-case (key alist) | 140 | (defmacro mh-assoc-ignore-case (key alist) |
| 138 | "Check if KEY is present in ALIST while ignoring case to do the comparison. | 141 | "Check if KEY is present in ALIST while ignoring case to do the comparison. |
| 139 | Compatibility macro for Emacs versions that lack `assoc-string', introduced in | 142 | Compatibility macro for Emacs versions that lack `assoc-string', |
| 140 | Emacs 22." | 143 | introduced in Emacs 22." |
| 141 | (if (fboundp 'assoc-string) | 144 | (if (fboundp 'assoc-string) |
| 142 | `(assoc-string ,key ,alist t) | 145 | `(assoc-string ,key ,alist t) |
| 143 | `(assoc-ignore-case ,key ,alist))) | 146 | `(assoc-ignore-case ,key ,alist))) |
diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index 1fbcdea0b18..f0eb08939dc 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el | |||
| @@ -68,10 +68,11 @@ | |||
| 68 | "/usr/lib/mh/MailAliases" "/usr/share/mailutils/mh/MailAliases" | 68 | "/usr/lib/mh/MailAliases" "/usr/share/mailutils/mh/MailAliases" |
| 69 | "/etc/passwd") | 69 | "/etc/passwd") |
| 70 | "*A list of system files which are a source of aliases. | 70 | "*A list of system files which are a source of aliases. |
| 71 | If these files are modified, they are automatically reread. This list need | 71 | If these files are modified, they are automatically reread. This list |
| 72 | include only system aliases and the passwd file, since personal alias files | 72 | need include only system aliases and the passwd file, since personal |
| 73 | listed in your `Aliasfile:' MH profile component are automatically included. | 73 | alias files listed in your `Aliasfile:' MH profile component are |
| 74 | You can update the alias list manually using \\[mh-alias-reload].") | 74 | automatically included. You can update the alias list manually using |
| 75 | \\[mh-alias-reload].") | ||
| 75 | 76 | ||
| 76 | 77 | ||
| 77 | 78 | ||
| @@ -79,8 +80,8 @@ You can update the alias list manually using \\[mh-alias-reload].") | |||
| 79 | 80 | ||
| 80 | (defun mh-alias-tstamp (arg) | 81 | (defun mh-alias-tstamp (arg) |
| 81 | "Check whether alias files have been modified. | 82 | "Check whether alias files have been modified. |
| 82 | Return t if any file listed in the Aliasfile MH profile component has been | 83 | Return t if any file listed in the Aliasfile MH profile component has |
| 83 | modified since the timestamp. | 84 | been modified since the timestamp. |
| 84 | If ARG is non-nil, set timestamp with the current time." | 85 | If ARG is non-nil, set timestamp with the current time." |
| 85 | (if arg | 86 | (if arg |
| 86 | (let ((time (current-time))) | 87 | (let ((time (current-time))) |
| @@ -98,8 +99,10 @@ If ARG is non-nil, set timestamp with the current time." | |||
| 98 | 99 | ||
| 99 | (defun mh-alias-filenames (arg) | 100 | (defun mh-alias-filenames (arg) |
| 100 | "Return list of filenames that contain aliases. | 101 | "Return list of filenames that contain aliases. |
| 101 | The filenames come from the Aliasfile profile component and are expanded. | 102 | The filenames come from the Aliasfile profile component and are |
| 102 | If ARG is non-nil, filenames listed in `mh-alias-system-aliases' are appended." | 103 | expanded. |
| 104 | If ARG is non-nil, filenames listed in `mh-alias-system-aliases' are | ||
| 105 | appended." | ||
| 103 | (or mh-progs (mh-find-path)) | 106 | (or mh-progs (mh-find-path)) |
| 104 | (save-excursion | 107 | (save-excursion |
| 105 | (let* ((filename (mh-profile-component "Aliasfile")) | 108 | (let* ((filename (mh-profile-component "Aliasfile")) |
| @@ -120,8 +123,8 @@ If ARG is non-nil, filenames listed in `mh-alias-system-aliases' are appended." | |||
| 120 | 123 | ||
| 121 | (defun mh-alias-gecos-name (gecos-name username comma-separator) | 124 | (defun mh-alias-gecos-name (gecos-name username comma-separator) |
| 122 | "Return a usable address string from a GECOS-NAME and USERNAME. | 125 | "Return a usable address string from a GECOS-NAME and USERNAME. |
| 123 | Use only part of the GECOS-NAME up to the first comma if COMMA-SEPARATOR is | 126 | Use only part of the GECOS-NAME up to the first comma if |
| 124 | non-nil." | 127 | COMMA-SEPARATOR is non-nil." |
| 125 | (let ((res gecos-name)) | 128 | (let ((res gecos-name)) |
| 126 | ;; Keep only string until first comma if COMMA-SEPARATOR is t. | 129 | ;; Keep only string until first comma if COMMA-SEPARATOR is t. |
| 127 | (if (and comma-separator | 130 | (if (and comma-separator |
| @@ -183,14 +186,15 @@ Exclude all aliases already in `mh-alias-alist' from `ali'" | |||
| 183 | (defun mh-alias-reload () | 186 | (defun mh-alias-reload () |
| 184 | "Reload MH aliases. | 187 | "Reload MH aliases. |
| 185 | 188 | ||
| 186 | Since aliases are updated frequently, MH-E reloads aliases automatically | 189 | Since aliases are updated frequently, MH-E reloads aliases |
| 187 | whenever an alias lookup occurs if an alias source has changed. Sources | 190 | automatically whenever an alias lookup occurs if an alias source has |
| 188 | include files listed in your `Aliasfile:' profile component and your password | 191 | changed. Sources include files listed in your `Aliasfile:' profile |
| 189 | file if option `mh-alias-local-users' is turned on. However, you can reload | 192 | component and your password file if option `mh-alias-local-users' is |
| 190 | your aliases manually by calling this command directly. | 193 | turned on. However, you can reload your aliases manually by calling |
| 194 | this command directly. | ||
| 191 | 195 | ||
| 192 | This function runs `mh-alias-reloaded-hook' after the aliases have been | 196 | This function runs `mh-alias-reloaded-hook' after the aliases have |
| 193 | loaded." | 197 | been loaded." |
| 194 | (interactive) | 198 | (interactive) |
| 195 | (save-excursion | 199 | (save-excursion |
| 196 | (message "Loading MH aliases...") | 200 | (message "Loading MH aliases...") |
| @@ -238,8 +242,8 @@ loaded." | |||
| 238 | (defun mh-alias-ali (alias &optional user) | 242 | (defun mh-alias-ali (alias &optional user) |
| 239 | "Return ali expansion for ALIAS. | 243 | "Return ali expansion for ALIAS. |
| 240 | ALIAS must be a string for a single alias. | 244 | ALIAS must be a string for a single alias. |
| 241 | If USER is t, then assume ALIAS is an address and call ali -user. | 245 | If USER is t, then assume ALIAS is an address and call ali -user. ali |
| 242 | ali returns the string unchanged if not defined. The same is done here." | 246 | returns the string unchanged if not defined. The same is done here." |
| 243 | (condition-case err | 247 | (condition-case err |
| 244 | (save-excursion | 248 | (save-excursion |
| 245 | (let ((user-arg (if user "-user" "-nouser"))) | 249 | (let ((user-arg (if user "-user" "-nouser"))) |
| @@ -322,8 +326,8 @@ Blind aliases or users from /etc/passwd are not expanded." | |||
| 322 | 326 | ||
| 323 | (defun mh-alias-suggest-alias (string &optional no-comma-swap) | 327 | (defun mh-alias-suggest-alias (string &optional no-comma-swap) |
| 324 | "Suggest an alias for STRING. | 328 | "Suggest an alias for STRING. |
| 325 | Don't reverse the order of strings separated by a comma if NO-COMMA-SWAP is | 329 | Don't reverse the order of strings separated by a comma if |
| 326 | non-nil." | 330 | NO-COMMA-SWAP is non-nil." |
| 327 | (cond | 331 | (cond |
| 328 | ((string-match "^<\\(.*\\)>$" string) | 332 | ((string-match "^<\\(.*\\)>$" string) |
| 329 | ;; <somename@foo.bar> -> recurse, stripping brackets. | 333 | ;; <somename@foo.bar> -> recurse, stripping brackets. |
| @@ -378,8 +382,8 @@ non-nil." | |||
| 378 | (defun mh-alias-canonicalize-suggestion (string) | 382 | (defun mh-alias-canonicalize-suggestion (string) |
| 379 | "Process STRING to replace spaces by periods. | 383 | "Process STRING to replace spaces by periods. |
| 380 | First all spaces and commas are replaced by periods. Then every run of | 384 | First all spaces and commas are replaced by periods. Then every run of |
| 381 | consecutive periods are replaced with a single period. Finally the string | 385 | consecutive periods are replaced with a single period. Finally the |
| 382 | is converted to lower case." | 386 | string is converted to lower case." |
| 383 | (with-temp-buffer | 387 | (with-temp-buffer |
| 384 | (insert string) | 388 | (insert string) |
| 385 | ;; Replace spaces with periods | 389 | ;; Replace spaces with periods |
| @@ -417,10 +421,10 @@ is converted to lower case." | |||
| 417 | 421 | ||
| 418 | (defun mh-alias-insert-file (&optional alias) | 422 | (defun mh-alias-insert-file (&optional alias) |
| 419 | "Return filename which should be used to add ALIAS. | 423 | "Return filename which should be used to add ALIAS. |
| 420 | The value of the option `mh-alias-insert-file' is used if non-nil\; otherwise | 424 | The value of the option `mh-alias-insert-file' is used if non-nil\; |
| 421 | the value of the `Aliasfile:' profile component is used. | 425 | otherwise the value of the `Aliasfile:' profile component is used. |
| 422 | If the alias already exists, try to return the name of the file that contains | 426 | If the alias already exists, try to return the name of the file that |
| 423 | it." | 427 | contains it." |
| 424 | (cond | 428 | (cond |
| 425 | ((and mh-alias-insert-file (listp mh-alias-insert-file)) | 429 | ((and mh-alias-insert-file (listp mh-alias-insert-file)) |
| 426 | (if (not (elt mh-alias-insert-file 1)) ; Only one entry, use it | 430 | (if (not (elt mh-alias-insert-file 1)) ; Only one entry, use it |
| @@ -488,12 +492,14 @@ Set `mh-alias-insert-file' or the Aliasfile profile component")) | |||
| 488 | 492 | ||
| 489 | (defun mh-alias-add-alias-to-file (alias address &optional file) | 493 | (defun mh-alias-add-alias-to-file (alias address &optional file) |
| 490 | "Add ALIAS for ADDRESS in alias FILE without alias check or prompts. | 494 | "Add ALIAS for ADDRESS in alias FILE without alias check or prompts. |
| 491 | Prompt for alias file if not provided and there is more than one candidate. | 495 | Prompt for alias file if not provided and there is more than one |
| 492 | 496 | candidate. | |
| 493 | If the alias exists already, you will have the choice of inserting the new | 497 | |
| 494 | alias before or after the old alias. In the former case, this alias will be | 498 | If the alias exists already, you will have the choice of |
| 495 | used when sending mail to this alias. In the latter case, the alias serves as | 499 | inserting the new alias before or after the old alias. In the |
| 496 | an additional folder name hint when filing messages." | 500 | former case, this alias will be used when sending mail to this |
| 501 | alias. In the latter case, the alias serves as an additional | ||
| 502 | folder name hint when filing messages." | ||
| 497 | (if (not file) | 503 | (if (not file) |
| 498 | (setq file (mh-alias-insert-file alias))) | 504 | (setq file (mh-alias-insert-file alias))) |
| 499 | (save-excursion | 505 | (save-excursion |
| @@ -543,11 +549,12 @@ an additional folder name hint when filing messages." | |||
| 543 | ;;;###mh-autoload | 549 | ;;;###mh-autoload |
| 544 | (defun mh-alias-add-alias (alias address) | 550 | (defun mh-alias-add-alias (alias address) |
| 545 | "*Add ALIAS for ADDRESS in personal alias file. | 551 | "*Add ALIAS for ADDRESS in personal alias file. |
| 546 | This function prompts you for an alias and address. If the alias exists | 552 | This function prompts you for an alias and address. If the alias |
| 547 | already, you will have the choice of inserting the new alias before or after | 553 | exists already, you will have the choice of inserting the new |
| 548 | the old alias. In the former case, this alias will be used when sending mail | 554 | alias before or after the old alias. In the former case, this |
| 549 | to this alias. In the latter case, the alias serves as an additional folder | 555 | alias will be used when sending mail to this alias. In the latter |
| 550 | name hint when filing messages." | 556 | case, the alias serves as an additional folder name hint when |
| 557 | filing messages." | ||
| 551 | (interactive "P\nP") | 558 | (interactive "P\nP") |
| 552 | (mh-alias-reload-maybe) | 559 | (mh-alias-reload-maybe) |
| 553 | (setq alias (completing-read "Alias: " mh-alias-alist nil nil alias)) | 560 | (setq alias (completing-read "Alias: " mh-alias-alist nil nil alias)) |
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index a28fa3e9e9e..7b32d5ec08b 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el | |||
| @@ -92,8 +92,8 @@ Some sites need to change this because of a name conflict.") | |||
| 92 | 92 | ||
| 93 | (defvar mh-redist-background nil | 93 | (defvar mh-redist-background nil |
| 94 | "If non-nil redist will be done in background like send. | 94 | "If non-nil redist will be done in background like send. |
| 95 | This allows transaction log to be visible if -watch, -verbose or -snoop are | 95 | This allows transaction log to be visible if -watch, -verbose or |
| 96 | used.") | 96 | -snoop are used.") |
| 97 | 97 | ||
| 98 | 98 | ||
| 99 | 99 | ||
| @@ -110,32 +110,39 @@ used.") | |||
| 110 | 110 | ||
| 111 | (defvar mh-yank-hooks nil | 111 | (defvar mh-yank-hooks nil |
| 112 | "Obsolete hook for modifying a citation just inserted in the mail buffer. | 112 | "Obsolete hook for modifying a citation just inserted in the mail buffer. |
| 113 | |||
| 113 | Each hook function can find the citation between point and mark. | 114 | Each hook function can find the citation between point and mark. |
| 114 | And each hook function should leave point and mark around the citation | 115 | And each hook function should leave point and mark around the |
| 115 | text as modified. | 116 | citation text as modified. |
| 116 | 117 | ||
| 117 | This is a normal hook, misnamed for historical reasons. | 118 | This is a normal hook, misnamed for historical reasons. It is |
| 118 | It is semi-obsolete and is only used if `mail-citation-hook' is nil.") | 119 | semi-obsolete and is only used if `mail-citation-hook' is nil.") |
| 119 | 120 | ||
| 120 | (defvar mh-comp-formfile "components" | 121 | (defvar mh-comp-formfile "components" |
| 121 | "Name of file to be used as a skeleton for composing messages. | 122 | "Name of file to be used as a skeleton for composing messages. |
| 122 | Default is \"components\". If not an absolute file name, the file | 123 | |
| 123 | is searched for first in the user's MH directory, then in the | 124 | Default is \"components\". |
| 124 | system MH lib directory.") | 125 | |
| 126 | If not an absolute file name, the file is searched for first in the | ||
| 127 | user's MH directory, then in the system MH lib directory.") | ||
| 125 | 128 | ||
| 126 | (defvar mh-repl-formfile "replcomps" | 129 | (defvar mh-repl-formfile "replcomps" |
| 127 | "Name of file to be used as a skeleton for replying to messages. | 130 | "Name of file to be used as a skeleton for replying to messages. |
| 128 | Default is \"replcomps\". If not an absolute file name, the file | 131 | |
| 129 | is searched for first in the user's MH directory, then in the | 132 | Default is \"replcomps\". |
| 130 | system MH lib directory.") | 133 | |
| 134 | If not an absolute file name, the file is searched for first in the | ||
| 135 | user's MH directory, then in the system MH lib directory.") | ||
| 131 | 136 | ||
| 132 | (defvar mh-repl-group-formfile "replgroupcomps" | 137 | (defvar mh-repl-group-formfile "replgroupcomps" |
| 133 | "Name of file to be used as a skeleton for replying to messages. | 138 | "Name of file to be used as a skeleton for replying to messages. |
| 134 | This file is used to form replies to the sender and all recipients of a | 139 | |
| 135 | message. Only used if `(mh-variant-p 'nmh)' is non-nil. | ||
| 136 | Default is \"replgroupcomps\". | 140 | Default is \"replgroupcomps\". |
| 137 | If not an absolute file name, the file is searched for first in the user's MH | 141 | |
| 138 | directory, then in the system MH lib directory.") | 142 | This file is used to form replies to the sender and all recipients of |
| 143 | a message. Only used if `(mh-variant-p 'nmh)' is non-nil. | ||
| 144 | If not an absolute file name, the file is searched for first in the | ||
| 145 | user's MH directory, then in the system MH lib directory.") | ||
| 139 | 146 | ||
| 140 | (defvar mh-rejected-letter-start | 147 | (defvar mh-rejected-letter-start |
| 141 | (format "^%s$" | 148 | (format "^%s$" |
| @@ -216,12 +223,12 @@ See `mh-send' for more details on composing mail." | |||
| 216 | (defun mh-smail-batch (&optional to subject other-headers &rest ignored) | 223 | (defun mh-smail-batch (&optional to subject other-headers &rest ignored) |
| 217 | "Compose a message with the MH mail system. | 224 | "Compose a message with the MH mail system. |
| 218 | 225 | ||
| 219 | This function does not prompt the user for any header fields, and thus | 226 | This function does not prompt the user for any header fields, and |
| 220 | is suitable for use by programs that want to create a mail buffer. Users | 227 | thus is suitable for use by programs that want to create a mail |
| 221 | should use \\[mh-smail] to compose mail. | 228 | buffer. Users should use \\[mh-smail] to compose mail. |
| 222 | 229 | ||
| 223 | Optional arguments for setting certain fields include TO, SUBJECT, and | 230 | Optional arguments for setting certain fields include TO, |
| 224 | OTHER-HEADERS. Additional arguments are IGNORED." | 231 | SUBJECT, and OTHER-HEADERS. Additional arguments are IGNORED." |
| 225 | (mh-find-path) | 232 | (mh-find-path) |
| 226 | (let ((mh-error-if-no-draft t)) | 233 | (let ((mh-error-if-no-draft t)) |
| 227 | (mh-send (or to "") "" (or subject "")))) | 234 | (mh-send (or to "") "" (or subject "")))) |
| @@ -237,11 +244,12 @@ This is `mail-user-agent' entry point to MH-E. | |||
| 237 | The optional arguments TO and SUBJECT specify recipients and the | 244 | The optional arguments TO and SUBJECT specify recipients and the |
| 238 | initial Subject field, respectively. | 245 | initial Subject field, respectively. |
| 239 | 246 | ||
| 240 | OTHER-HEADERS is an alist specifying additional | 247 | OTHER-HEADERS is an alist specifying additional header fields. |
| 241 | header fields. Elements look like (HEADER . VALUE) where both | 248 | Elements look like (HEADER . VALUE) where both HEADER and VALUE |
| 242 | HEADER and VALUE are strings. | 249 | are strings. |
| 243 | 250 | ||
| 244 | CONTINUE, SWITCH-FUNCTION, YANK-ACTION and SEND-ACTIONS are ignored." | 251 | CONTINUE, SWITCH-FUNCTION, YANK-ACTION and SEND-ACTIONS are |
| 252 | ignored." | ||
| 245 | (mh-find-path) | 253 | (mh-find-path) |
| 246 | (let ((mh-error-if-no-draft t)) | 254 | (let ((mh-error-if-no-draft t)) |
| 247 | (mh-send to "" subject) | 255 | (mh-send to "" subject) |
| @@ -254,20 +262,21 @@ CONTINUE, SWITCH-FUNCTION, YANK-ACTION and SEND-ACTIONS are ignored." | |||
| 254 | (defun mh-edit-again (message) | 262 | (defun mh-edit-again (message) |
| 255 | "Edit a MESSAGE to send it again. | 263 | "Edit a MESSAGE to send it again. |
| 256 | 264 | ||
| 257 | If you don't complete a draft for one reason or another, and if the draft | 265 | If you don't complete a draft for one reason or another, and if |
| 258 | buffer is no longer available, you can pick your draft up again with this | 266 | the draft buffer is no longer available, you can pick your draft |
| 259 | command. If you don't use a draft folder, your last \"draft\" file will be | 267 | up again with this command. If you don't use a draft folder, your |
| 260 | used. If you use draft folders, you'll need to visit the draft folder with | 268 | last \"draft\" file will be used. If you use draft folders, |
| 261 | \"\\[mh-visit-folder] drafts <RET>\", use \\[mh-next-undeleted-msg] to move to | 269 | you'll need to visit the draft folder with \"\\[mh-visit-folder] |
| 262 | the appropriate message, and then use \\[mh-edit-again] to prepare the message | 270 | drafts <RET>\", use \\[mh-next-undeleted-msg] to move to the |
| 263 | for editing. | 271 | appropriate message, and then use \\[mh-edit-again] to prepare |
| 272 | the message for editing. | ||
| 264 | 273 | ||
| 265 | This command can also be used to take messages that were sent to you and to | 274 | This command can also be used to take messages that were sent to |
| 266 | send them to more people. | 275 | you and to send them to more people. |
| 267 | 276 | ||
| 268 | Don't use this command to re-edit a message from a Mailer-Daemon who | 277 | Don't use this command to re-edit a message from a Mailer-Daemon |
| 269 | complained that your mail wasn't posted for some reason or another (see | 278 | who complained that your mail wasn't posted for some reason or |
| 270 | `mh-extract-rejected-mail'). | 279 | another (see `mh-extract-rejected-mail'). |
| 271 | 280 | ||
| 272 | The default message is the current message. | 281 | The default message is the current message. |
| 273 | 282 | ||
| @@ -303,9 +312,10 @@ See also `mh-send'." | |||
| 303 | (defun mh-extract-rejected-mail (message) | 312 | (defun mh-extract-rejected-mail (message) |
| 304 | "Edit a MESSAGE that was returned by the mail system. | 313 | "Edit a MESSAGE that was returned by the mail system. |
| 305 | 314 | ||
| 306 | This command prepares the message for editing by removing the Mailer-Daemon | 315 | This command prepares the message for editing by removing the |
| 307 | envelope and unneeded header fields. Fix whatever addressing problem you had, | 316 | Mailer-Daemon envelope and unneeded header fields. Fix whatever |
| 308 | and send the message again with \\[mh-send-letter]. | 317 | addressing problem you had, and send the message again with |
| 318 | \\[mh-send-letter]. | ||
| 309 | 319 | ||
| 310 | The default message is the current message. | 320 | The default message is the current message. |
| 311 | 321 | ||
| @@ -335,13 +345,14 @@ See also `mh-send'." | |||
| 335 | (defun mh-forward (to cc &optional range) | 345 | (defun mh-forward (to cc &optional range) |
| 336 | "Forward message. | 346 | "Forward message. |
| 337 | 347 | ||
| 338 | You are prompted for the TO and CC recipients. You are given a draft | 348 | You are prompted for the TO and CC recipients. You are given a |
| 339 | to edit that looks like it would if you had run the MH command | 349 | draft to edit that looks like it would if you had run the MH |
| 340 | \"forw\". You can then add some text. | 350 | command \"forw\". You can then add some text. |
| 341 | 351 | ||
| 342 | You can forward several messages by using a RANGE. All of the messages | 352 | You can forward several messages by using a RANGE. All of the |
| 343 | in the range are inserted into your draft. Check the documentation of | 353 | messages in the range are inserted into your draft. Check the |
| 344 | `mh-interactive-range' to see how RANGE is read in interactive use. | 354 | documentation of `mh-interactive-range' to see how RANGE is read |
| 355 | in interactive use. | ||
| 345 | 356 | ||
| 346 | The hook `mh-forward-hook' is called on the draft. | 357 | The hook `mh-forward-hook' is called on the draft. |
| 347 | 358 | ||
| @@ -434,14 +445,15 @@ Original message has headers FROM and SUBJECT." | |||
| 434 | (defun mh-redistribute (to cc &optional message) | 445 | (defun mh-redistribute (to cc &optional message) |
| 435 | "Redistribute a message. | 446 | "Redistribute a message. |
| 436 | 447 | ||
| 437 | This command is similar in function to forwarding mail, but it does not allow | 448 | This command is similar in function to forwarding mail, but it |
| 438 | you to edit the message, nor does it add your name to the \"From\" header | 449 | does not allow you to edit the message, nor does it add your name |
| 439 | field. It appears to the recipient as if the message had come from the | 450 | to the \"From\" header field. It appears to the recipient as if |
| 440 | original sender. When you run this command, you are prompted for the TO and CC | 451 | the message had come from the original sender. When you run this |
| 441 | recipients. The default MESSAGE is the current message. | 452 | command, you are prompted for the TO and CC recipients. The |
| 453 | default MESSAGE is the current message. | ||
| 442 | 454 | ||
| 443 | Also investigate the \\[mh-edit-again] command for another way to redistribute | 455 | Also investigate the \\[mh-edit-again] command for another way to |
| 444 | messages. | 456 | redistribute messages. |
| 445 | 457 | ||
| 446 | See also `mh-redist-full-contents-flag'." | 458 | See also `mh-redist-full-contents-flag'." |
| 447 | (interactive (list (mh-read-address "Redist-To: ") | 459 | (interactive (list (mh-read-address "Redist-To: ") |
| @@ -486,10 +498,11 @@ See also `mh-redist-full-contents-flag'." | |||
| 486 | 498 | ||
| 487 | (defun mh-show-buffer-message-number (&optional buffer) | 499 | (defun mh-show-buffer-message-number (&optional buffer) |
| 488 | "Message number of displayed message in corresponding show buffer. | 500 | "Message number of displayed message in corresponding show buffer. |
| 501 | |||
| 489 | Return nil if show buffer not displayed. | 502 | Return nil if show buffer not displayed. |
| 490 | If in `mh-letter-mode', don't display the message number being replied to, | 503 | If in `mh-letter-mode', don't display the message number being replied |
| 491 | but rather the message number of the show buffer associated with our | 504 | to, but rather the message number of the show buffer associated with |
| 492 | originating folder buffer. | 505 | our originating folder buffer. |
| 493 | Optional argument BUFFER can be used to specify the buffer." | 506 | Optional argument BUFFER can be used to specify the buffer." |
| 494 | (save-excursion | 507 | (save-excursion |
| 495 | (if buffer | 508 | (if buffer |
| @@ -513,14 +526,14 @@ Optional argument BUFFER can be used to specify the buffer." | |||
| 513 | (defun mh-reply (message &optional reply-to includep) | 526 | (defun mh-reply (message &optional reply-to includep) |
| 514 | "Reply to a MESSAGE. | 527 | "Reply to a MESSAGE. |
| 515 | 528 | ||
| 516 | When you reply to a message, you are first prompted with \"Reply to whom?\" | 529 | When you reply to a message, you are first prompted with \"Reply |
| 517 | \(unless the optional argument REPLY-TO is provided). You have several choices | 530 | to whom?\" (unless the optional argument REPLY-TO is provided). |
| 518 | here. | 531 | You have several choices here. |
| 519 | 532 | ||
| 520 | Response Reply Goes To | 533 | Response Reply Goes To |
| 521 | 534 | ||
| 522 | from The person who sent the message. This is the default, | 535 | from The person who sent the message. This is the |
| 523 | so <RET> is sufficient. | 536 | default, so <RET> is sufficient. |
| 524 | 537 | ||
| 525 | to Replies to the sender, plus all recipients in the | 538 | to Replies to the sender, plus all recipients in the |
| 526 | \"To:\" header field. | 539 | \"To:\" header field. |
| @@ -528,31 +541,32 @@ here. | |||
| 528 | all | 541 | all |
| 529 | cc Forms a reply to the sender, plus all recipients. | 542 | cc Forms a reply to the sender, plus all recipients. |
| 530 | 543 | ||
| 531 | Depending on your answer, \"repl\" is given a different argument to form your | 544 | Depending on your answer, \"repl\" is given a different argument |
| 532 | reply. Specifically, a choice of \"from\" or none at all runs \"repl -nocc | 545 | to form your reply. Specifically, a choice of \"from\" or none at |
| 533 | all\", and a choice of \"to\" runs \"repl -cc to\". Finally, either \"cc\" or | 546 | all runs \"repl -nocc all\", and a choice of \"to\" runs \"repl |
| 534 | \"all\" runs \"repl -cc all -nocc me\". | 547 | -cc to\". Finally, either \"cc\" or \"all\" runs \"repl -cc all |
| 548 | -nocc me\". | ||
| 535 | 549 | ||
| 536 | Two windows are then created. One window contains the message to which you are | 550 | Two windows are then created. One window contains the message to |
| 537 | replying in an MH-Show buffer. Your draft, in MH-Letter mode | 551 | which you are replying in an MH-Show buffer. Your draft, in |
| 538 | \(see `mh-letter-mode'), is in the other window. | 552 | MH-Letter mode \(see `mh-letter-mode'), is in the other window. |
| 539 | 553 | ||
| 540 | If you supply a prefix argument INCLUDEP, the message you are replying to is | 554 | If you supply a prefix argument INCLUDEP, the message you are |
| 541 | inserted in your reply after having first been run through \"mhl\" with the | 555 | replying to is inserted in your reply after having first been run |
| 542 | format file \"mhl.reply\". | 556 | through \"mhl\" with the format file \"mhl.reply\". |
| 543 | 557 | ||
| 544 | Alternatively, you can customize the option `mh-yank-behavior' and choose one | 558 | Alternatively, you can customize the option `mh-yank-behavior' |
| 545 | of its \"Automatically\" variants to do the same thing. If you do so, the | 559 | and choose one of its \"Automatically\" variants to do the same |
| 546 | prefix argument has no effect. | 560 | thing. If you do so, the prefix argument has no effect. |
| 547 | 561 | ||
| 548 | Another way to include the message automatically in your draft is to use | 562 | Another way to include the message automatically in your draft is |
| 549 | \"repl: -filter repl.filter\" in your MH profile. | 563 | to use \"repl: -filter repl.filter\" in your MH profile. |
| 550 | 564 | ||
| 551 | If you wish to customize the header or other parts of the reply draft, please | 565 | If you wish to customize the header or other parts of the reply |
| 552 | see \"repl\" and \"mh-format\". | 566 | draft, please see \"repl\" and \"mh-format\". |
| 553 | 567 | ||
| 554 | See also `mh-reply-show-message-flag', `mh-reply-default-reply-to', and | 568 | See also `mh-reply-show-message-flag', |
| 555 | `mh-send'." | 569 | `mh-reply-default-reply-to', and `mh-send'." |
| 556 | (interactive (list | 570 | (interactive (list |
| 557 | (mh-get-msg-num t) | 571 | (mh-get-msg-num t) |
| 558 | (let ((minibuffer-help-form | 572 | (let ((minibuffer-help-form |
| @@ -619,17 +633,19 @@ See also `mh-reply-show-message-flag', `mh-reply-default-reply-to', and | |||
| 619 | (defun mh-send (to cc subject) | 633 | (defun mh-send (to cc subject) |
| 620 | "Compose a message. | 634 | "Compose a message. |
| 621 | 635 | ||
| 622 | Your letter appears in an Emacs buffer whose mode is MH-Letter (see | 636 | Your letter appears in an Emacs buffer whose mode is |
| 623 | `mh-letter-mode'). | 637 | MH-Letter (see `mh-letter-mode'). |
| 624 | 638 | ||
| 625 | The arguments TO, CC, and SUBJECT can be used to prefill the draft fields or | 639 | The arguments TO, CC, and SUBJECT can be used to prefill the |
| 626 | suppress the prompts if `mh-compose-prompt-flag' is on. They are also passed | 640 | draft fields or suppress the prompts if `mh-compose-prompt-flag' |
| 627 | to the function set in the option `mh-compose-letter-function'. | 641 | is on. They are also passed to the function set in the option |
| 642 | `mh-compose-letter-function'. | ||
| 628 | 643 | ||
| 629 | See also `mh-insert-x-mailer-flag' and `mh-letter-mode-hook'. | 644 | See also `mh-insert-x-mailer-flag' and `mh-letter-mode-hook'. |
| 630 | 645 | ||
| 631 | Outside of an MH-Folder buffer (`mh-folder-mode'), you must call either | 646 | Outside of an MH-Folder buffer (`mh-folder-mode'), you must call |
| 632 | \\[mh-smail] or \\[mh-smail-other-window] to compose a new message." | 647 | either \\[mh-smail] or \\[mh-smail-other-window] to compose a new |
| 648 | message." | ||
| 633 | (interactive (list | 649 | (interactive (list |
| 634 | (mh-interactive-read-address "To: ") | 650 | (mh-interactive-read-address "To: ") |
| 635 | (mh-interactive-read-address "Cc: ") | 651 | (mh-interactive-read-address "Cc: ") |
| @@ -642,8 +658,8 @@ Outside of an MH-Folder buffer (`mh-folder-mode'), you must call either | |||
| 642 | (defun mh-send-other-window (to cc subject) | 658 | (defun mh-send-other-window (to cc subject) |
| 643 | "Compose a message in another window. | 659 | "Compose a message in another window. |
| 644 | 660 | ||
| 645 | See `mh-send' for more information and a description of how the TO, CC, and | 661 | See `mh-send' for more information and a description of how the |
| 646 | SUBJECT arguments are used." | 662 | TO, CC, and SUBJECT arguments are used." |
| 647 | (interactive (list | 663 | (interactive (list |
| 648 | (mh-interactive-read-address "To: ") | 664 | (mh-interactive-read-address "To: ") |
| 649 | (mh-interactive-read-address "Cc: ") | 665 | (mh-interactive-read-address "Cc: ") |
| @@ -693,14 +709,16 @@ CONFIG is the window configuration before sending mail." | |||
| 693 | 709 | ||
| 694 | (defun mh-read-draft (use initial-contents delete-contents-file) | 710 | (defun mh-read-draft (use initial-contents delete-contents-file) |
| 695 | "Read draft file into a draft buffer and make that buffer the current one. | 711 | "Read draft file into a draft buffer and make that buffer the current one. |
| 696 | USE is a message used for prompting about the intended use of the message. | 712 | |
| 713 | USE is a message used for prompting about the intended use of the | ||
| 714 | message. | ||
| 697 | INITIAL-CONTENTS is filename that is read into an empty buffer, or nil | 715 | INITIAL-CONTENTS is filename that is read into an empty buffer, or nil |
| 698 | if buffer should not be modified. Delete the initial-contents file if | 716 | if buffer should not be modified. Delete the initial-contents file if |
| 699 | DELETE-CONTENTS-FILE flag is set. | 717 | DELETE-CONTENTS-FILE flag is set. |
| 700 | Returns the draft folder's name. | 718 | Returns the draft folder's name. |
| 701 | If the draft folder facility is enabled in ~/.mh_profile, a new buffer is | 719 | If the draft folder facility is enabled in ~/.mh_profile, a new buffer |
| 702 | used each time and saved in the draft folder. The draft file can then be | 720 | is used each time and saved in the draft folder. The draft file can |
| 703 | reused." | 721 | then be reused." |
| 704 | (cond (mh-draft-folder | 722 | (cond (mh-draft-folder |
| 705 | (let ((orig-default-dir default-directory) | 723 | (let ((orig-default-dir default-directory) |
| 706 | (draft-file-name (mh-new-draft-name))) | 724 | (draft-file-name (mh-new-draft-name))) |
| @@ -748,7 +766,8 @@ reused." | |||
| 748 | 766 | ||
| 749 | (defun mh-annotate-msg (msg buffer note &rest args) | 767 | (defun mh-annotate-msg (msg buffer note &rest args) |
| 750 | "Mark MSG in BUFFER with character NOTE and annotate message with ARGS. | 768 | "Mark MSG in BUFFER with character NOTE and annotate message with ARGS. |
| 751 | MSG can be a message number, a list of message numbers, or a sequence." | 769 | MSG can be a message number, a list of message numbers, or a |
| 770 | sequence." | ||
| 752 | (apply 'mh-exec-cmd "anno" buffer | 771 | (apply 'mh-exec-cmd "anno" buffer |
| 753 | (if (listp msg) (append msg args) (cons msg args))) | 772 | (if (listp msg) (append msg args) (cons msg args))) |
| 754 | (save-excursion | 773 | (save-excursion |
| @@ -780,7 +799,8 @@ Do not insert any pairs whose value is the empty string." | |||
| 780 | "Move to the end of the FIELD in the header. | 799 | "Move to the end of the FIELD in the header. |
| 781 | Move to end of entire header if FIELD not found. | 800 | Move to end of entire header if FIELD not found. |
| 782 | Returns non-nil iff FIELD was found. | 801 | Returns non-nil iff FIELD was found. |
| 783 | The optional second arg is for pre-version 4 compatibility and is IGNORED." | 802 | The optional second arg is for pre-version 4 compatibility and is |
| 803 | IGNORED." | ||
| 784 | (cond ((mh-goto-header-field field) | 804 | (cond ((mh-goto-header-field field) |
| 785 | (mh-header-field-end) | 805 | (mh-header-field-end) |
| 786 | t) | 806 | t) |
| @@ -907,20 +927,21 @@ Returns t if found, nil if not." | |||
| 907 | "\t\t Signature: \\[mh-insert-signature]")) | 927 | "\t\t Signature: \\[mh-insert-signature]")) |
| 908 | "Key binding cheat sheet. | 928 | "Key binding cheat sheet. |
| 909 | 929 | ||
| 910 | This is an associative array which is used to show the most common commands. | 930 | This is an associative array which is used to show the most |
| 911 | The key is a prefix char. The value is one or more strings which are | 931 | common commands. The key is a prefix char. The value is one or |
| 912 | concatenated together and displayed in the minibuffer if ? is pressed after | 932 | more strings which are concatenated together and displayed in the |
| 913 | the prefix character. The special key nil is used to display the | 933 | minibuffer if ? is pressed after the prefix character. The |
| 914 | non-prefixed commands. | 934 | special key nil is used to display the non-prefixed commands. |
| 915 | 935 | ||
| 916 | The substitutions described in `substitute-command-keys' are performed as | 936 | The substitutions described in `substitute-command-keys' are |
| 917 | well.") | 937 | performed as well.") |
| 918 | 938 | ||
| 919 | ;;;###mh-autoload | 939 | ;;;###mh-autoload |
| 920 | (defun mh-fill-paragraph-function (arg) | 940 | (defun mh-fill-paragraph-function (arg) |
| 921 | "Fill paragraph at or after point. | 941 | "Fill paragraph at or after point. |
| 922 | Prefix ARG means justify as well. This function enables `fill-paragraph' to | 942 | Prefix ARG means justify as well. This function enables |
| 923 | work better in MH-Letter mode (see `mh-letter-mode')." | 943 | `fill-paragraph' to work better in MH-Letter mode (see |
| 944 | `mh-letter-mode')." | ||
| 924 | (interactive "P") | 945 | (interactive "P") |
| 925 | (let ((fill-paragraph-function) (fill-prefix)) | 946 | (let ((fill-paragraph-function) (fill-prefix)) |
| 926 | (if (mh-in-header-p) | 947 | (if (mh-in-header-p) |
| @@ -938,14 +959,14 @@ work better in MH-Letter mode (see `mh-letter-mode')." | |||
| 938 | (define-derived-mode mh-letter-mode text-mode "MH-Letter" | 959 | (define-derived-mode mh-letter-mode text-mode "MH-Letter" |
| 939 | "Mode for composing letters in MH-E\\<mh-letter-mode-map>. | 960 | "Mode for composing letters in MH-E\\<mh-letter-mode-map>. |
| 940 | 961 | ||
| 941 | When you have finished composing, type \\[mh-send-letter] to send the | 962 | When you have finished composing, type \\[mh-send-letter] to send |
| 942 | message using the MH mail handling system. | 963 | the message using the MH mail handling system. |
| 943 | 964 | ||
| 944 | There are two types of tags used by MH-E when composing MIME messages: | 965 | There are two types of tags used by MH-E when composing MIME |
| 945 | MML and MH. The option `mh-compose-insertion' controls what type of | 966 | messages: MML and MH. The option `mh-compose-insertion' controls |
| 946 | tags are inserted by MH-E commands. These tags can be converted to | 967 | what type of tags are inserted by MH-E commands. These tags can |
| 947 | MIME body parts by running \\[mh-mh-to-mime] for MH-style directives | 968 | be converted to MIME body parts by running \\[mh-mh-to-mime] for |
| 948 | or \\[mh-mml-to-mime] for MML tags. | 969 | MH-style directives or \\[mh-mml-to-mime] for MML tags. |
| 949 | 970 | ||
| 950 | Options that control this mode can be changed with | 971 | Options that control this mode can be changed with |
| 951 | \\[customize-group]; specify the \"mh-compose\" group. | 972 | \\[customize-group]; specify the \"mh-compose\" group. |
| @@ -1054,8 +1075,8 @@ When a message is composed, the hooks `text-mode-hook' and | |||
| 1054 | 1075 | ||
| 1055 | (defun mh-letter-header-end () | 1076 | (defun mh-letter-header-end () |
| 1056 | "Find the end of the message header. | 1077 | "Find the end of the message header. |
| 1057 | This function is to be used only for font locking. It works by searching for | 1078 | This function is to be used only for font locking. It works by |
| 1058 | `mh-mail-header-separator' in the buffer." | 1079 | searching for `mh-mail-header-separator' in the buffer." |
| 1059 | (save-excursion | 1080 | (save-excursion |
| 1060 | (goto-char (point-min)) | 1081 | (goto-char (point-min)) |
| 1061 | (cond ((equal mh-mail-header-separator "") (point-min)) | 1082 | (cond ((equal mh-mail-header-separator "") (point-min)) |
| @@ -1065,7 +1086,8 @@ This function is to be used only for font locking. It works by searching for | |||
| 1065 | 1086 | ||
| 1066 | (defun mh-auto-fill-for-letter () | 1087 | (defun mh-auto-fill-for-letter () |
| 1067 | "Perform auto-fill for message. | 1088 | "Perform auto-fill for message. |
| 1068 | Header is treated specially by inserting a tab before continuation lines." | 1089 | Header is treated specially by inserting a tab before continuation |
| 1090 | lines." | ||
| 1069 | (if (mh-in-header-p) | 1091 | (if (mh-in-header-p) |
| 1070 | (let ((fill-prefix "\t")) | 1092 | (let ((fill-prefix "\t")) |
| 1071 | (do-auto-fill)) | 1093 | (do-auto-fill)) |
| @@ -1083,8 +1105,9 @@ Header is treated specially by inserting a tab before continuation lines." | |||
| 1083 | (defun mh-to-field () | 1105 | (defun mh-to-field () |
| 1084 | "Move to specified header field. | 1106 | "Move to specified header field. |
| 1085 | The field is indicated by the previous keystroke (the last keystroke | 1107 | The field is indicated by the previous keystroke (the last keystroke |
| 1086 | of the command) according to the list in the variable `mh-to-field-choices'. | 1108 | of the command) according to the list in the variable |
| 1087 | Create the field if it does not exist. Set the mark to point before moving." | 1109 | `mh-to-field-choices'. Create the field if it does not exist. Set the |
| 1110 | mark to point before moving." | ||
| 1088 | (interactive) | 1111 | (interactive) |
| 1089 | (expand-abbrev) | 1112 | (expand-abbrev) |
| 1090 | (let ((target (cdr (or (assoc (char-to-string (logior last-input-char ?`)) | 1113 | (let ((target (cdr (or (assoc (char-to-string (logior last-input-char ?`)) |
| @@ -1113,8 +1136,8 @@ Create the field if it does not exist. Set the mark to point before moving." | |||
| 1113 | ;;;###mh-autoload | 1136 | ;;;###mh-autoload |
| 1114 | (defun mh-to-fcc (&optional folder) | 1137 | (defun mh-to-fcc (&optional folder) |
| 1115 | "Move to \"Fcc:\" header field. | 1138 | "Move to \"Fcc:\" header field. |
| 1116 | This command will prompt you for the FOLDER name in which to file a copy of | 1139 | This command will prompt you for the FOLDER name in which to file a |
| 1117 | the draft." | 1140 | copy of the draft." |
| 1118 | (interactive) | 1141 | (interactive) |
| 1119 | (or folder | 1142 | (or folder |
| 1120 | (setq folder (mh-prompt-for-folder | 1143 | (setq folder (mh-prompt-for-folder |
| @@ -1215,9 +1238,10 @@ In a program, you can pass in a signature FILE." | |||
| 1215 | ;;;###mh-autoload | 1238 | ;;;###mh-autoload |
| 1216 | (defun mh-check-whom () | 1239 | (defun mh-check-whom () |
| 1217 | "Verify recipients, showing expansion of any aliases. | 1240 | "Verify recipients, showing expansion of any aliases. |
| 1218 | This command expands aliases so you can check the actual address(es) in the | 1241 | |
| 1219 | alias. A new buffer named \"*MH-E Recipients*\" is created with the output of | 1242 | This command expands aliases so you can check the actual address(es) |
| 1220 | \"whom\"." | 1243 | in the alias. A new buffer named \"*MH-E Recipients*\" is created with |
| 1244 | the output of \"whom\"." | ||
| 1221 | (interactive) | 1245 | (interactive) |
| 1222 | (let ((file-name buffer-file-name)) | 1246 | (let ((file-name buffer-file-name)) |
| 1223 | (save-buffer) | 1247 | (save-buffer) |
| @@ -1256,8 +1280,8 @@ If the field already exists, this function does nothing." | |||
| 1256 | 1280 | ||
| 1257 | (defvar mh-x-mailer-string nil | 1281 | (defvar mh-x-mailer-string nil |
| 1258 | "*String containing the contents of the X-Mailer header field. | 1282 | "*String containing the contents of the X-Mailer header field. |
| 1259 | If nil, this variable is initialized to show the version of MH-E, Emacs, and | 1283 | If nil, this variable is initialized to show the version of MH-E, |
| 1260 | MH the first time a message is composed.") | 1284 | Emacs, and MH the first time a message is composed.") |
| 1261 | 1285 | ||
| 1262 | (defun mh-insert-x-mailer () | 1286 | (defun mh-insert-x-mailer () |
| 1263 | "Append an X-Mailer field to the header. | 1287 | "Append an X-Mailer field to the header. |
| @@ -1298,11 +1322,14 @@ The versions of MH-E, Emacs, and MH are shown." | |||
| 1298 | ;;;###mh-autoload | 1322 | ;;;###mh-autoload |
| 1299 | (defun mh-insert-auto-fields (&optional non-interactive) | 1323 | (defun mh-insert-auto-fields (&optional non-interactive) |
| 1300 | "Insert custom fields if recipient is found in `mh-auto-fields-list'. | 1324 | "Insert custom fields if recipient is found in `mh-auto-fields-list'. |
| 1301 | Sets buffer-local `mh-insert-auto-fields-done-local' when done and inserted | ||
| 1302 | something. If NON-INTERACTIVE is non-nil, do not be verbose and only | ||
| 1303 | attempt matches if `mh-insert-auto-fields-done-local' is nil. | ||
| 1304 | 1325 | ||
| 1305 | An `identity' entry is skipped if one was already entered manually. | 1326 | Sets buffer-local `mh-insert-auto-fields-done-local' when done |
| 1327 | and inserted something. If NON-INTERACTIVE is non-nil, do not be | ||
| 1328 | verbose and only attempt matches if | ||
| 1329 | `mh-insert-auto-fields-done-local' is nil. | ||
| 1330 | |||
| 1331 | An `identity' entry is skipped if one was already entered | ||
| 1332 | manually. | ||
| 1306 | 1333 | ||
| 1307 | Return t if fields added; otherwise return nil." | 1334 | Return t if fields added; otherwise return nil." |
| 1308 | (interactive) | 1335 | (interactive) |
| @@ -1343,7 +1370,8 @@ Return t if fields added; otherwise return nil." | |||
| 1343 | 1370 | ||
| 1344 | (defun mh-modify-header-field (field value &optional overwrite-flag) | 1371 | (defun mh-modify-header-field (field value &optional overwrite-flag) |
| 1345 | "To header FIELD add VALUE. | 1372 | "To header FIELD add VALUE. |
| 1346 | If OVERWRITE-FLAG is non-nil then the old value, if present, is discarded." | 1373 | If OVERWRITE-FLAG is non-nil then the old value, if present, is |
| 1374 | discarded." | ||
| 1347 | (cond ((and overwrite-flag | 1375 | (cond ((and overwrite-flag |
| 1348 | (mh-goto-header-field (concat field ":"))) | 1376 | (mh-goto-header-field (concat field ":"))) |
| 1349 | (insert " " value) | 1377 | (insert " " value) |
| @@ -1366,15 +1394,16 @@ If OVERWRITE-FLAG is non-nil then the old value, if present, is discarded." | |||
| 1366 | config) | 1394 | config) |
| 1367 | "Edit and compose a draft message in buffer DRAFT and send or save it. | 1395 | "Edit and compose a draft message in buffer DRAFT and send or save it. |
| 1368 | SEND-ARGS is the argument passed to the send command. | 1396 | SEND-ARGS is the argument passed to the send command. |
| 1369 | SENT-FROM-FOLDER is buffer containing scan listing of current folder, or | 1397 | SENT-FROM-FOLDER is buffer containing scan listing of current folder, |
| 1370 | nil if none exists. | 1398 | or nil if none exists. |
| 1371 | SENT-FROM-MSG is the message number or sequence name or nil. | 1399 | SENT-FROM-MSG is the message number or sequence name or nil. |
| 1372 | The TO, SUBJECT, and CC fields are passed to the | 1400 | The TO, SUBJECT, and CC fields are passed to the |
| 1373 | `mh-compose-letter-function'. | 1401 | `mh-compose-letter-function'. |
| 1374 | If ANNOTATE-CHAR is non-null, it is used to notate the scan listing of the | 1402 | If ANNOTATE-CHAR is non-null, it is used to notate the scan listing of |
| 1375 | message. In that case, the ANNOTATE-FIELD is used to build a string | 1403 | the message. In that case, the ANNOTATE-FIELD is used to build a |
| 1376 | for `mh-annotate-msg'. | 1404 | string for `mh-annotate-msg'. |
| 1377 | CONFIG is the window configuration to restore after sending the letter." | 1405 | CONFIG is the window configuration to restore after sending the |
| 1406 | letter." | ||
| 1378 | (pop-to-buffer draft) | 1407 | (pop-to-buffer draft) |
| 1379 | (mh-letter-mode) | 1408 | (mh-letter-mode) |
| 1380 | 1409 | ||
| @@ -1421,8 +1450,8 @@ This should be the last function called when composing the draft." | |||
| 1421 | 1450 | ||
| 1422 | (defun mh-ascii-buffer-p () | 1451 | (defun mh-ascii-buffer-p () |
| 1423 | "Check if current buffer is entirely composed of ASCII. | 1452 | "Check if current buffer is entirely composed of ASCII. |
| 1424 | The function doesn't work for XEmacs since `find-charset-region' doesn't exist | 1453 | The function doesn't work for XEmacs since `find-charset-region' |
| 1425 | there." | 1454 | doesn't exist there." |
| 1426 | (loop for charset in (mh-funcall-if-exists | 1455 | (loop for charset in (mh-funcall-if-exists |
| 1427 | find-charset-region (point-min) (point-max)) | 1456 | find-charset-region (point-min) (point-max)) |
| 1428 | unless (eq charset 'ascii) return nil | 1457 | unless (eq charset 'ascii) return nil |
| @@ -1509,15 +1538,17 @@ use `mh-send-prog' to tell MH-E the name." | |||
| 1509 | ;;;###mh-autoload | 1538 | ;;;###mh-autoload |
| 1510 | (defun mh-insert-letter (folder message verbatim) | 1539 | (defun mh-insert-letter (folder message verbatim) |
| 1511 | "Insert a message. | 1540 | "Insert a message. |
| 1512 | This command prompts you for the FOLDER and MESSAGE number and inserts the | 1541 | |
| 1513 | message, indented by `mh-ins-buf-prefix' (\"> \") unless `mh-yank-behavior' is | 1542 | This command prompts you for the FOLDER and MESSAGE number and inserts |
| 1514 | set to one of the supercite flavors in which case supercite is used to format | 1543 | the message, indented by `mh-ins-buf-prefix' (\"> \") unless |
| 1515 | the message. Certain undesirable header fields (see | 1544 | `mh-yank-behavior' is set to one of the supercite flavors in which |
| 1516 | `mh-invisible-header-fields-compiled') are removed before insertion. | 1545 | case supercite is used to format the message. Certain undesirable |
| 1517 | 1546 | header fields (see `mh-invisible-header-fields-compiled') are removed | |
| 1518 | If given a prefix argument VERBATIM, the header is left intact, the message is | 1547 | before insertion. |
| 1519 | not indented, and \"> \" is not inserted before each line. This command leaves | 1548 | |
| 1520 | the mark before the letter and point after it." | 1549 | If given a prefix argument VERBATIM, the header is left intact, the |
| 1550 | message is not indented, and \"> \" is not inserted before each line. | ||
| 1551 | This command leaves the mark before the letter and point after it." | ||
| 1521 | (interactive | 1552 | (interactive |
| 1522 | (list (mh-prompt-for-folder "Message from" mh-sent-from-folder nil) | 1553 | (list (mh-prompt-for-folder "Message from" mh-sent-from-folder nil) |
| 1523 | (read-string (concat "Message number" | 1554 | (read-string (concat "Message number" |
| @@ -1559,31 +1590,34 @@ the mark before the letter and point after it." | |||
| 1559 | (defun mh-yank-cur-msg () | 1590 | (defun mh-yank-cur-msg () |
| 1560 | "Insert the current message into the draft buffer. | 1591 | "Insert the current message into the draft buffer. |
| 1561 | 1592 | ||
| 1562 | It is often useful to insert a snippet of text from a letter that someone | 1593 | It is often useful to insert a snippet of text from a letter that |
| 1563 | mailed to provide some context for your reply. This command does this by | 1594 | someone mailed to provide some context for your reply. This |
| 1564 | adding an attribution, yanking a portion of text from the message to which | 1595 | command does this by adding an attribution, yanking a portion of |
| 1565 | you're replying, and inserting `mh-ins-buf-prefix' (`> ') before each line. | 1596 | text from the message to which you're replying, and inserting |
| 1597 | `mh-ins-buf-prefix' (`> ') before each line. | ||
| 1566 | 1598 | ||
| 1567 | The attribution consists of the sender's name and email address | 1599 | The attribution consists of the sender's name and email address |
| 1568 | followed by the content of the `mh-extract-from-attribution-verb' | 1600 | followed by the content of the `mh-extract-from-attribution-verb' |
| 1569 | option. | 1601 | option. |
| 1570 | 1602 | ||
| 1571 | You can also turn on the `mh-delete-yanked-msg-window-flag' option to delete | 1603 | You can also turn on the `mh-delete-yanked-msg-window-flag' |
| 1572 | the window containing the original message after yanking it to make more room | 1604 | option to delete the window containing the original message after |
| 1573 | on your screen for your reply. | 1605 | yanking it to make more room on your screen for your reply. |
| 1574 | 1606 | ||
| 1575 | You can control how the message to which you are replying is yanked | 1607 | You can control how the message to which you are replying is |
| 1576 | into your reply using `mh-yank-behavior'. | 1608 | yanked into your reply using `mh-yank-behavior'. |
| 1577 | 1609 | ||
| 1578 | If this isn't enough, you can gain full control over the appearance of the | 1610 | If this isn't enough, you can gain full control over the |
| 1579 | included text by setting `mail-citation-hook' to a function that modifies it. | 1611 | appearance of the included text by setting `mail-citation-hook' |
| 1580 | For example, if you set this hook to `trivial-cite' (which is NOT part of | 1612 | to a function that modifies it. For example, if you set this hook |
| 1581 | Emacs), set `mh-yank-behavior' to \"Body and Header\" (see URL | 1613 | to `trivial-cite' \(which is NOT part of Emacs), set |
| 1614 | `mh-yank-behavior' to \"Body and Header\" (see URL | ||
| 1582 | `http://shasta.cs.uiuc.edu/~lrclause/tc.html'). | 1615 | `http://shasta.cs.uiuc.edu/~lrclause/tc.html'). |
| 1583 | 1616 | ||
| 1584 | Note that if `mail-citation-hook' is set, `mh-ins-buf-prefix' is not inserted. | 1617 | Note that if `mail-citation-hook' is set, `mh-ins-buf-prefix' is |
| 1585 | If the option `mh-yank-behavior' is set to one of the supercite flavors, the | 1618 | not inserted. If the option `mh-yank-behavior' is set to one of |
| 1586 | hook `mail-citation-hook' is ignored and `mh-ins-buf-prefix' is not inserted." | 1619 | the supercite flavors, the hook `mail-citation-hook' is ignored |
| 1620 | and `mh-ins-buf-prefix' is not inserted." | ||
| 1587 | (interactive) | 1621 | (interactive) |
| 1588 | (if (and mh-sent-from-folder | 1622 | (if (and mh-sent-from-folder |
| 1589 | (save-excursion (set-buffer mh-sent-from-folder) mh-show-buffer) | 1623 | (save-excursion (set-buffer mh-sent-from-folder) mh-show-buffer) |
| @@ -1676,9 +1710,9 @@ hook `mail-citation-hook' is ignored and `mh-ins-buf-prefix' is not inserted." | |||
| 1676 | 1710 | ||
| 1677 | (defun mh-insert-prefix-string (mh-ins-string) | 1711 | (defun mh-insert-prefix-string (mh-ins-string) |
| 1678 | "Insert prefix string before each line in buffer. | 1712 | "Insert prefix string before each line in buffer. |
| 1679 | The inserted letter is cited using `sc-cite-original' if `mh-yank-behavior' is | 1713 | The inserted letter is cited using `sc-cite-original' if |
| 1680 | one of 'supercite or 'autosupercite. Otherwise, simply insert MH-INS-STRING | 1714 | `mh-yank-behavior' is one of 'supercite or 'autosupercite. |
| 1681 | before each line." | 1715 | Otherwise, simply insert MH-INS-STRING before each line." |
| 1682 | (goto-char (point-min)) | 1716 | (goto-char (point-min)) |
| 1683 | (cond ((or (eq mh-yank-behavior 'supercite) | 1717 | (cond ((or (eq mh-yank-behavior 'supercite) |
| 1684 | (eq mh-yank-behavior 'autosupercite)) | 1718 | (eq mh-yank-behavior 'autosupercite)) |
| @@ -1697,9 +1731,10 @@ before each line." | |||
| 1697 | ;;;###mh-autoload | 1731 | ;;;###mh-autoload |
| 1698 | (defun mh-fully-kill-draft () | 1732 | (defun mh-fully-kill-draft () |
| 1699 | "Quit editing and delete draft message. | 1733 | "Quit editing and delete draft message. |
| 1700 | If for some reason you are not happy with the draft, you can use the this | 1734 | If for some reason you are not happy with the draft, you can use |
| 1701 | command to kill the draft buffer and delete the draft message. Use the | 1735 | the this command to kill the draft buffer and delete the draft |
| 1702 | \\[kill-buffer] command if you don't want to delete the draft message." | 1736 | message. Use the \\[kill-buffer] command if you don't want to |
| 1737 | delete the draft message." | ||
| 1703 | (interactive) | 1738 | (interactive) |
| 1704 | (if (y-or-n-p "Kill draft message? ") | 1739 | (if (y-or-n-p "Kill draft message? ") |
| 1705 | (let ((config mh-previous-window-config)) | 1740 | (let ((config mh-previous-window-config)) |
| @@ -1727,10 +1762,12 @@ command to kill the draft buffer and delete the draft message. Use the | |||
| 1727 | ;;;###mh-autoload | 1762 | ;;;###mh-autoload |
| 1728 | (defun mh-open-line () | 1763 | (defun mh-open-line () |
| 1729 | "Insert a newline and leave point after it. | 1764 | "Insert a newline and leave point after it. |
| 1730 | This command is similar to the \\[open-line] command in that it inserts a | 1765 | |
| 1731 | newline after point. It differs in that it also inserts the right number of | 1766 | This command is similar to the \\[open-line] command in that it |
| 1732 | quoting characters and spaces so that the next line begins in the same column | 1767 | inserts a newline after point. It differs in that it also inserts |
| 1733 | as it was. This is useful when breaking up paragraphs in replies." | 1768 | the right number of quoting characters and spaces so that the |
| 1769 | next line begins in the same column as it was. This is useful | ||
| 1770 | when breaking up paragraphs in replies." | ||
| 1734 | (interactive) | 1771 | (interactive) |
| 1735 | (let ((column (current-column)) | 1772 | (let ((column (current-column)) |
| 1736 | (prefix (mh-current-fill-prefix))) | 1773 | (prefix (mh-current-fill-prefix))) |
| @@ -1747,9 +1784,9 @@ as it was. This is useful when breaking up paragraphs in replies." | |||
| 1747 | (defmacro mh-display-completion-list-compat (word choices) | 1784 | (defmacro mh-display-completion-list-compat (word choices) |
| 1748 | "Completes WORD from CHOICES using `display-completion-list'. | 1785 | "Completes WORD from CHOICES using `display-completion-list'. |
| 1749 | Calls `display-completion-list' correctly in older environments. | 1786 | Calls `display-completion-list' correctly in older environments. |
| 1750 | Versions of Emacs prior to version 22 lacked a COMMON-SUBSTRING argument | 1787 | Versions of Emacs prior to version 22 lacked a COMMON-SUBSTRING |
| 1751 | which is used to highlight the next possible character you can enter | 1788 | argument which is used to highlight the next possible character you |
| 1752 | in the current list of completions." | 1789 | can enter in the current list of completions." |
| 1753 | (if (>= emacs-major-version 22) | 1790 | (if (>= emacs-major-version 22) |
| 1754 | `(display-completion-list (all-completions ,word ,choices) ,word) | 1791 | `(display-completion-list (all-completions ,word ,choices) ,word) |
| 1755 | `(display-completion-list (all-completions ,word ,choices)))) | 1792 | `(display-completion-list (all-completions ,word ,choices)))) |
| @@ -1818,11 +1855,12 @@ Any match found replaces the text from BEGIN to END." | |||
| 1818 | 1855 | ||
| 1819 | (defun mh-letter-complete (arg) | 1856 | (defun mh-letter-complete (arg) |
| 1820 | "Perform completion on header field or word preceding point. | 1857 | "Perform completion on header field or word preceding point. |
| 1821 | If the field contains addresses (for example, \"To:\" or \"Cc:\") or folders | 1858 | If the field contains addresses (for example, \"To:\" or \"Cc:\") |
| 1822 | \(for example, \"Fcc:\") then this command will provide alias completion. In | 1859 | or folders \(for example, \"Fcc:\") then this command will |
| 1823 | the body of the message, this command runs `mh-letter-complete-function' | 1860 | provide alias completion. In the body of the message, this |
| 1824 | instead, which is set to \"'ispell-complete-word\" by default. This command | 1861 | command runs `mh-letter-complete-function' instead, which is set |
| 1825 | takes a prefix argument ARG that is passed to the | 1862 | to \"'ispell-complete-word\" by default. This command takes a |
| 1863 | prefix argument ARG that is passed to the | ||
| 1826 | `mh-letter-complete-function'." | 1864 | `mh-letter-complete-function'." |
| 1827 | (interactive "P") | 1865 | (interactive "P") |
| 1828 | (let ((func nil)) | 1866 | (let ((func nil)) |
| @@ -1835,8 +1873,9 @@ takes a prefix argument ARG that is passed to the | |||
| 1835 | 1873 | ||
| 1836 | (defun mh-letter-complete-or-space (arg) | 1874 | (defun mh-letter-complete-or-space (arg) |
| 1837 | "Perform completion or insert space. | 1875 | "Perform completion or insert space. |
| 1838 | Turn on the `mh-compose-space-does-completion-flag' option to use this command | 1876 | Turn on the `mh-compose-space-does-completion-flag' option to use |
| 1839 | to perform completion in the header. Otherwise, a space is inserted. | 1877 | this command to perform completion in the header. Otherwise, a |
| 1878 | space is inserted. | ||
| 1840 | 1879 | ||
| 1841 | ARG is the number of spaces inserted." | 1880 | ARG is the number of spaces inserted." |
| 1842 | (interactive "p") | 1881 | (interactive "p") |
| @@ -1855,9 +1894,9 @@ ARG is the number of spaces inserted." | |||
| 1855 | 1894 | ||
| 1856 | (defun mh-letter-confirm-address () | 1895 | (defun mh-letter-confirm-address () |
| 1857 | "Flash alias expansion. | 1896 | "Flash alias expansion. |
| 1858 | Addresses are separated by a comma\; and when you press the comma, this | 1897 | Addresses are separated by a comma\; and when you press the |
| 1859 | command flashes the alias expansion in the minibuffer if | 1898 | comma, this command flashes the alias expansion in the minibuffer |
| 1860 | `mh-alias-flash-on-comma' is turned on." | 1899 | if `mh-alias-flash-on-comma' is turned on." |
| 1861 | (interactive) | 1900 | (interactive) |
| 1862 | (cond ((not (mh-in-header-p)) (self-insert-command 1)) | 1901 | (cond ((not (mh-in-header-p)) (self-insert-command 1)) |
| 1863 | ((eq (cdr (assoc (mh-letter-header-field-at-point) | 1902 | ((eq (cdr (assoc (mh-letter-header-field-at-point) |
| @@ -1871,8 +1910,8 @@ command flashes the alias expansion in the minibuffer if | |||
| 1871 | 1910 | ||
| 1872 | (defun mh-letter-header-field-at-point () | 1911 | (defun mh-letter-header-field-at-point () |
| 1873 | "Return the header field name at point. | 1912 | "Return the header field name at point. |
| 1874 | A symbol is returned whose name is the string obtained by downcasing the field | 1913 | A symbol is returned whose name is the string obtained by |
| 1875 | name." | 1914 | downcasing the field name." |
| 1876 | (save-excursion | 1915 | (save-excursion |
| 1877 | (end-of-line) | 1916 | (end-of-line) |
| 1878 | (and (re-search-backward mh-letter-header-field-regexp nil t) | 1917 | (and (re-search-backward mh-letter-header-field-regexp nil t) |
| @@ -1881,12 +1920,13 @@ name." | |||
| 1881 | ;;;###mh-autoload | 1920 | ;;;###mh-autoload |
| 1882 | (defun mh-letter-next-header-field-or-indent (arg) | 1921 | (defun mh-letter-next-header-field-or-indent (arg) |
| 1883 | "Move to next field or indent depending on point. | 1922 | "Move to next field or indent depending on point. |
| 1884 | Within the header of the message, this command moves between fields, but skips | 1923 | Within the header of the message, this command moves between |
| 1885 | those fields listed in `mh-compose-skipped-header-fields'. After the last | 1924 | fields, but skips those fields listed in |
| 1886 | field, this command then moves point to the message body before cycling back | 1925 | `mh-compose-skipped-header-fields'. After the last field, this |
| 1887 | to the first field. If point is already past the first line of the message | 1926 | command then moves point to the message body before cycling back |
| 1888 | body, then this command indents by calling `indent-relative' with the given | 1927 | to the first field. If point is already past the first line of |
| 1889 | prefix argument ARG." | 1928 | the message body, then this command indents by calling |
| 1929 | `indent-relative' with the given prefix argument ARG." | ||
| 1890 | (interactive "P") | 1930 | (interactive "P") |
| 1891 | (let ((header-end (save-excursion | 1931 | (let ((header-end (save-excursion |
| 1892 | (goto-char (mh-mail-header-end)) | 1932 | (goto-char (mh-mail-header-end)) |
| @@ -1898,7 +1938,8 @@ prefix argument ARG." | |||
| 1898 | 1938 | ||
| 1899 | (defun mh-letter-next-header-field () | 1939 | (defun mh-letter-next-header-field () |
| 1900 | "Cycle to the next header field. | 1940 | "Cycle to the next header field. |
| 1901 | If we are at the last header field go to the start of the message body." | 1941 | If we are at the last header field go to the start of the message |
| 1942 | body." | ||
| 1902 | (let ((header-end (mh-mail-header-end))) | 1943 | (let ((header-end (mh-mail-header-end))) |
| 1903 | (cond ((>= (point) header-end) (goto-char (point-min))) | 1944 | (cond ((>= (point) header-end) (goto-char (point-min))) |
| 1904 | ((< (point) (progn | 1945 | ((< (point) (progn |
| @@ -1918,10 +1959,10 @@ If we are at the last header field go to the start of the message body." | |||
| 1918 | ;;;###mh-autoload | 1959 | ;;;###mh-autoload |
| 1919 | (defun mh-letter-previous-header-field () | 1960 | (defun mh-letter-previous-header-field () |
| 1920 | "Cycle to the previous header field. | 1961 | "Cycle to the previous header field. |
| 1921 | This command moves backwards between the fields and cycles to the body of the | 1962 | This command moves backwards between the fields and cycles to the |
| 1922 | message after the first field. Unlike the | 1963 | body of the message after the first field. Unlike the |
| 1923 | \\[mh-letter-next-header-field-or-indent] command, it will always take point | 1964 | \\[mh-letter-next-header-field-or-indent] command, it will always |
| 1924 | to the last field from anywhere in the body." | 1965 | take point to the last field from anywhere in the body." |
| 1925 | (interactive) | 1966 | (interactive) |
| 1926 | (let ((header-end (mh-mail-header-end))) | 1967 | (let ((header-end (mh-mail-header-end))) |
| 1927 | (if (>= (point) header-end) | 1968 | (if (>= (point) header-end) |
| @@ -1944,8 +1985,8 @@ to the last field from anywhere in the body." | |||
| 1944 | 1985 | ||
| 1945 | (defun mh-letter-skip-leading-whitespace-in-header-field () | 1986 | (defun mh-letter-skip-leading-whitespace-in-header-field () |
| 1946 | "Skip leading whitespace in a header field. | 1987 | "Skip leading whitespace in a header field. |
| 1947 | If the header field doesn't have at least one space after the colon then a | 1988 | If the header field doesn't have at least one space after the |
| 1948 | space character is added." | 1989 | colon then a space character is added." |
| 1949 | (let ((need-space t)) | 1990 | (let ((need-space t)) |
| 1950 | (while (memq (char-after) '(?\t ?\ )) | 1991 | (while (memq (char-after) '(?\t ?\ )) |
| 1951 | (forward-char) | 1992 | (forward-char) |
| @@ -1963,8 +2004,9 @@ space character is added." | |||
| 1963 | 2004 | ||
| 1964 | (defun mh-letter-toggle-header-field-display-button (event) | 2005 | (defun mh-letter-toggle-header-field-display-button (event) |
| 1965 | "Toggle header field display at location of EVENT. | 2006 | "Toggle header field display at location of EVENT. |
| 1966 | This function does the same thing as `mh-letter-toggle-header-field-display' | 2007 | This function does the same thing as |
| 1967 | except that it is callable from a mouse button." | 2008 | `mh-letter-toggle-header-field-display' except that it is |
| 2009 | callable from a mouse button." | ||
| 1968 | (interactive "e") | 2010 | (interactive "e") |
| 1969 | (mh-do-at-event-location event | 2011 | (mh-do-at-event-location event |
| 1970 | (mh-letter-toggle-header-field-display nil))) | 2012 | (mh-letter-toggle-header-field-display nil))) |
| @@ -1972,10 +2014,10 @@ except that it is callable from a mouse button." | |||
| 1972 | (defun mh-letter-toggle-header-field-display (arg) | 2014 | (defun mh-letter-toggle-header-field-display (arg) |
| 1973 | "Toggle display of header field at point. | 2015 | "Toggle display of header field at point. |
| 1974 | 2016 | ||
| 1975 | Use this command to display truncated header fields. This command is a toggle | 2017 | Use this command to display truncated header fields. This command |
| 1976 | so entering it again will hide the field. This command takes a prefix argument | 2018 | is a toggle so entering it again will hide the field. This |
| 1977 | ARG: if negative then the field is hidden, if positive then the field is | 2019 | command takes a prefix argument ARG: if negative then the field |
| 1978 | displayed." | 2020 | is hidden, if positive then the field is displayed." |
| 1979 | (interactive (list nil)) | 2021 | (interactive (list nil)) |
| 1980 | (when (and (mh-in-header-p) | 2022 | (when (and (mh-in-header-p) |
| 1981 | (progn | 2023 | (progn |
| @@ -2035,13 +2077,15 @@ If the current line is too long truncate a part of it as well." | |||
| 2035 | 2077 | ||
| 2036 | (defun mh-interactive-read-address (prompt) | 2078 | (defun mh-interactive-read-address (prompt) |
| 2037 | "Read an address. | 2079 | "Read an address. |
| 2038 | If `mh-compose-prompt-flag' is non-nil, then read an address with PROMPT. | 2080 | If `mh-compose-prompt-flag' is non-nil, then read an address with |
| 2081 | PROMPT. | ||
| 2039 | Otherwise return the empty string." | 2082 | Otherwise return the empty string." |
| 2040 | (if mh-compose-prompt-flag (mh-read-address prompt) "")) | 2083 | (if mh-compose-prompt-flag (mh-read-address prompt) "")) |
| 2041 | 2084 | ||
| 2042 | (defun mh-interactive-read-string (prompt) | 2085 | (defun mh-interactive-read-string (prompt) |
| 2043 | "Read a string. | 2086 | "Read a string. |
| 2044 | If `mh-compose-prompt-flag' is non-nil, then read a string with PROMPT. | 2087 | If `mh-compose-prompt-flag' is non-nil, then read a string with |
| 2088 | PROMPT. | ||
| 2045 | Otherwise return the empty string." | 2089 | Otherwise return the empty string." |
| 2046 | (if mh-compose-prompt-flag (read-string prompt) "")) | 2090 | (if mh-compose-prompt-flag (read-string prompt) "")) |
| 2047 | 2091 | ||
diff --git a/lisp/mh-e/mh-customize.el b/lisp/mh-e/mh-customize.el index 779a25cf03c..c45004805c3 100644 --- a/lisp/mh-e/mh-customize.el +++ b/lisp/mh-e/mh-customize.el | |||
| @@ -90,8 +90,8 @@ | |||
| 90 | 90 | ||
| 91 | (defun mh-customize (&optional delete-other-windows-flag) | 91 | (defun mh-customize (&optional delete-other-windows-flag) |
| 92 | "Customize MH-E variables. | 92 | "Customize MH-E variables. |
| 93 | If optional argument DELETE-OTHER-WINDOWS-FLAG is non-nil, other windows in | 93 | If optional argument DELETE-OTHER-WINDOWS-FLAG is non-nil, other |
| 94 | the frame are removed." | 94 | windows in the frame are removed." |
| 95 | (interactive "P") | 95 | (interactive "P") |
| 96 | (customize-group 'mh-e) | 96 | (customize-group 'mh-e) |
| 97 | (when delete-other-windows-flag | 97 | (when delete-other-windows-flag |
| @@ -103,8 +103,8 @@ the frame are removed." | |||
| 103 | 103 | ||
| 104 | (defgroup mh-e nil | 104 | (defgroup mh-e nil |
| 105 | "Emacs interface to the MH mail system. | 105 | "Emacs interface to the MH mail system. |
| 106 | MH is the Rand Mail Handler. Other implementations include nmh and GNU | 106 | MH is the Rand Mail Handler. Other implementations include nmh |
| 107 | mailutils." | 107 | and GNU mailutils." |
| 108 | :link '(custom-manual "(mh-e)Top") | 108 | :link '(custom-manual "(mh-e)Top") |
| 109 | :group 'mail) | 109 | :group 'mail) |
| 110 | 110 | ||
| @@ -271,12 +271,14 @@ See `mh-variant'." | |||
| 271 | (defcustom mh-variant 'autodetect | 271 | (defcustom mh-variant 'autodetect |
| 272 | "*Specifies the variant used by MH-E. | 272 | "*Specifies the variant used by MH-E. |
| 273 | 273 | ||
| 274 | The default setting of this option is `Auto-detect' which means that MH-E will | 274 | The default setting of this option is `Auto-detect' which means |
| 275 | automatically choose the first of nmh, MH, or GNU mailutils that it finds in | 275 | that MH-E will automatically choose the first of nmh, MH, or GNU |
| 276 | the directories listed in `mh-path' (which you can customize), `mh-sys-path', | 276 | mailutils that it finds in the directories listed in |
| 277 | and `exec-path'. If, for example, you have both nmh and mailutils installed | 277 | `mh-path' (which you can customize), `mh-sys-path', and |
| 278 | and `mh-variant-in-use' was initialized to nmh but you want to use mailutils, | 278 | `exec-path'. If, for example, you have both nmh and mailutils |
| 279 | then you can set this option to `mailutils'. | 279 | installed and `mh-variant-in-use' was initialized to nmh but you |
| 280 | want to use mailutils, then you can set this option to | ||
| 281 | `mailutils'. | ||
| 280 | 282 | ||
| 281 | When this variable is changed, MH-E resets `mh-progs', `mh-lib', | 283 | When this variable is changed, MH-E resets `mh-progs', `mh-lib', |
| 282 | `mh-lib-progs', `mh-flists-present-flag', and `mh-variant-in-use' | 284 | `mh-lib-progs', `mh-flists-present-flag', and `mh-variant-in-use' |
| @@ -295,26 +297,30 @@ accordingly." | |||
| 295 | 297 | ||
| 296 | (defcustom mh-alias-completion-ignore-case-flag t | 298 | (defcustom mh-alias-completion-ignore-case-flag t |
| 297 | "*Non-nil means don't consider case significant in MH alias completion. | 299 | "*Non-nil means don't consider case significant in MH alias completion. |
| 298 | As MH ignores case in the aliases, so too does MH-E. However, you may turn | 300 | |
| 299 | this option off to make case significant which can be used to segregate | 301 | As MH ignores case in the aliases, so too does MH-E. However, you |
| 300 | completion of your aliases. You might use lowercase for mailing lists and | 302 | may turn this option off to make case significant which can be |
| 301 | uppercase for people." | 303 | used to segregate completion of your aliases. You might use |
| 304 | lowercase for mailing lists and uppercase for people." | ||
| 302 | :type 'boolean | 305 | :type 'boolean |
| 303 | :group 'mh-alias) | 306 | :group 'mh-alias) |
| 304 | 307 | ||
| 305 | (defcustom mh-alias-expand-aliases-flag nil | 308 | (defcustom mh-alias-expand-aliases-flag nil |
| 306 | "*Non-nil means to expand aliases entered in the minibuffer. | 309 | "*Non-nil means to expand aliases entered in the minibuffer. |
| 307 | In other words, aliases entered in the minibuffer will be expanded to the full | 310 | |
| 308 | address in the message draft. By default, this expansion is not performed." | 311 | In other words, aliases entered in the minibuffer will be |
| 312 | expanded to the full address in the message draft. By default, | ||
| 313 | this expansion is not performed." | ||
| 309 | :type 'boolean | 314 | :type 'boolean |
| 310 | :group 'mh-alias) | 315 | :group 'mh-alias) |
| 311 | 316 | ||
| 312 | (defcustom mh-alias-flash-on-comma t | 317 | (defcustom mh-alias-flash-on-comma t |
| 313 | "*Specify whether to flash address or warn on translation. | 318 | "*Specify whether to flash address or warn on translation. |
| 314 | This option controls the behavior when a [comma] is pressed while entering | 319 | |
| 315 | aliases or addresses. The default setting flashes the address associated with | 320 | This option controls the behavior when a [comma] is pressed while |
| 316 | an address in the minibuffer briefly, but does not display a warning if the | 321 | entering aliases or addresses. The default setting flashes the |
| 317 | alias is not found." | 322 | address associated with an address in the minibuffer briefly, but |
| 323 | does not display a warning if the alias is not found." | ||
| 318 | :type '(choice (const :tag "Flash but Don't Warn If No Alias" t) | 324 | :type '(choice (const :tag "Flash but Don't Warn If No Alias" t) |
| 319 | (const :tag "Flash and Warn If No Alias" 1) | 325 | (const :tag "Flash and Warn If No Alias" 1) |
| 320 | (const :tag "Don't Flash Nor Warn If No Alias" nil)) | 326 | (const :tag "Don't Flash Nor Warn If No Alias" nil)) |
| @@ -322,11 +328,12 @@ alias is not found." | |||
| 322 | 328 | ||
| 323 | (defcustom mh-alias-insert-file nil | 329 | (defcustom mh-alias-insert-file nil |
| 324 | "*Filename used to store a new MH-E alias. | 330 | "*Filename used to store a new MH-E alias. |
| 325 | The default setting of this option is `Use Aliasfile Profile Component'. This | 331 | |
| 326 | option can also hold the name of a file or a list a file names. If this option | 332 | The default setting of this option is `Use Aliasfile Profile |
| 327 | is set to a list of file names, or the `Aliasfile:' profile component contains | 333 | Component'. This option can also hold the name of a file or a |
| 328 | more than one file name, MH-E will prompt for one of them when MH-E adds an | 334 | list a file names. If this option is set to a list of file names, |
| 329 | alias." | 335 | or the `Aliasfile:' profile component contains more than one file |
| 336 | name, MH-E will prompt for one of them when MH-E adds an alias." | ||
| 330 | :type '(choice (const :tag "Use Aliasfile Profile Component" nil) | 337 | :type '(choice (const :tag "Use Aliasfile Profile Component" nil) |
| 331 | (file :tag "Alias File") | 338 | (file :tag "Alias File") |
| 332 | (repeat :tag "List of Alias Files" file)) | 339 | (repeat :tag "List of Alias Files" file)) |
| @@ -334,9 +341,10 @@ alias." | |||
| 334 | 341 | ||
| 335 | (defcustom mh-alias-insertion-location 'sorted | 342 | (defcustom mh-alias-insertion-location 'sorted |
| 336 | "Specifies where new aliases are entered in alias files. | 343 | "Specifies where new aliases are entered in alias files. |
| 337 | This option is set to `Alphabetical' by default. If you organize your alias | 344 | |
| 338 | file in other ways, then adding aliases to the `Top' or `Bottom' of your alias | 345 | This option is set to `Alphabetical' by default. If you organize |
| 339 | file might be more appropriate." | 346 | your alias file in other ways, then adding aliases to the `Top' |
| 347 | or `Bottom' of your alias file might be more appropriate." | ||
| 340 | :type '(choice (const :tag "Alphabetical" sorted) | 348 | :type '(choice (const :tag "Alphabetical" sorted) |
| 341 | (const :tag "Top" top) | 349 | (const :tag "Top" top) |
| 342 | (const :tag "Bottom" bottom)) | 350 | (const :tag "Bottom" bottom)) |
| @@ -345,17 +353,20 @@ file might be more appropriate." | |||
| 345 | (defcustom mh-alias-local-users t | 353 | (defcustom mh-alias-local-users t |
| 346 | "*If on, local users are added to alias completion. | 354 | "*If on, local users are added to alias completion. |
| 347 | 355 | ||
| 348 | Aliases are created from `/etc/passwd' entries with a user ID larger than | 356 | Aliases are created from `/etc/passwd' entries with a user ID |
| 349 | a magical number, typically 200. This can be a handy tool on a machine where | 357 | larger than a magical number, typically 200. This can be a handy |
| 350 | you and co-workers exchange messages. These aliases have the form | 358 | tool on a machine where you and co-workers exchange messages. |
| 351 | `local.first.last' if a real name is present in the password file. | 359 | These aliases have the form `local.first.last' if a real name is |
| 352 | Otherwise, the alias will have the form `local.login'. | 360 | present in the password file. Otherwise, the alias will have the |
| 361 | form `local.login'. | ||
| 353 | 362 | ||
| 354 | If you're on a system with thousands of users you don't know, and the loading | 363 | If you're on a system with thousands of users you don't know, and |
| 355 | of local aliases slows MH-E down noticeably, then turn this option off. | 364 | the loading of local aliases slows MH-E down noticeably, then |
| 365 | turn this option off. | ||
| 356 | 366 | ||
| 357 | This option also takes a string which is executed to generate the password | 367 | This option also takes a string which is executed to generate the |
| 358 | file. For example, use \"ypcat passwd\" to obtain the NIS password file." | 368 | password file. For example, use \"ypcat passwd\" to obtain the |
| 369 | NIS password file." | ||
| 359 | :type '(choice (boolean) (string)) | 370 | :type '(choice (boolean) (string)) |
| 360 | :group 'mh-alias) | 371 | :group 'mh-alias) |
| 361 | 372 | ||
| @@ -367,24 +378,27 @@ For example, consider the following password file entry: | |||
| 367 | 378 | ||
| 368 | psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh | 379 | psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh |
| 369 | 380 | ||
| 370 | The following settings of this option will produce the associated aliases: | 381 | The following settings of this option will produce the associated |
| 382 | aliases: | ||
| 371 | 383 | ||
| 372 | \"local.\" local.peter.galbraith | 384 | \"local.\" local.peter.galbraith |
| 373 | \"\" peter.galbraith | 385 | \"\" peter.galbraith |
| 374 | Use Login psg | 386 | Use Login psg |
| 375 | 387 | ||
| 376 | This option has no effect if variable `mh-alias-local-users' is turned off." | 388 | This option has no effect if variable `mh-alias-local-users' is |
| 389 | turned off." | ||
| 377 | :type '(choice (const :tag "Use Login" nil) | 390 | :type '(choice (const :tag "Use Login" nil) |
| 378 | (string)) | 391 | (string)) |
| 379 | :group 'mh-alias) | 392 | :group 'mh-alias) |
| 380 | 393 | ||
| 381 | (defcustom mh-alias-passwd-gecos-comma-separator-flag t | 394 | (defcustom mh-alias-passwd-gecos-comma-separator-flag t |
| 382 | "*Non-nil means the gecos field in the password file uses a comma separator. | 395 | "*Non-nil means the gecos field in the password file uses a comma separator. |
| 383 | In the example in `mh-alias-local-users-prefix', commas are used to separate | 396 | |
| 384 | different values within the so-called gecos field. This is a fairly common | 397 | In the example in `mh-alias-local-users-prefix', commas are used |
| 385 | usage. However, in the rare case that the gecos field in your password file is | 398 | to separate different values within the so-called gecos field. |
| 386 | not separated by commas and whose contents may contain commas, you can turn | 399 | This is a fairly common usage. However, in the rare case that the |
| 387 | this option off." | 400 | gecos field in your password file is not separated by commas and |
| 401 | whose contents may contain commas, you can turn this option off." | ||
| 388 | :type 'boolean | 402 | :type 'boolean |
| 389 | :group 'mh-alias) | 403 | :group 'mh-alias) |
| 390 | 404 | ||
| @@ -395,9 +409,10 @@ this option off." | |||
| 395 | (defcustom mh-new-messages-folders t | 409 | (defcustom mh-new-messages-folders t |
| 396 | "Folders searched for the \"unseen\" sequence. | 410 | "Folders searched for the \"unseen\" sequence. |
| 397 | 411 | ||
| 398 | Set this option to \"Inbox\" to search the \"+inbox\" folder or \"All\" to | 412 | Set this option to \"Inbox\" to search the \"+inbox\" folder or |
| 399 | search all of the top level folders. Otherwise, list the folders that should | 413 | \"All\" to search all of the top level folders. Otherwise, list |
| 400 | be searched with the \"Choose Folders\" menu item. | 414 | the folders that should be searched with the \"Choose Folders\" |
| 415 | menu item. | ||
| 401 | 416 | ||
| 402 | See also `mh-recursive-folders-flag'." | 417 | See also `mh-recursive-folders-flag'." |
| 403 | :type '(choice (const :tag "Inbox" t) | 418 | :type '(choice (const :tag "Inbox" t) |
| @@ -408,9 +423,10 @@ See also `mh-recursive-folders-flag'." | |||
| 408 | (defcustom mh-ticked-messages-folders t | 423 | (defcustom mh-ticked-messages-folders t |
| 409 | "Folders searched for `mh-tick-seq'. | 424 | "Folders searched for `mh-tick-seq'. |
| 410 | 425 | ||
| 411 | Set this option to \"Inbox\" to search the \"+inbox\" folder or \"All\" to | 426 | Set this option to \"Inbox\" to search the \"+inbox\" folder or |
| 412 | search all of the top level folders. Otherwise, list the folders that should | 427 | \"All\" to search all of the top level folders. Otherwise, list |
| 413 | be searched with the \"Choose Folders\" menu item. | 428 | the folders that should be searched with the \"Choose Folders\" |
| 429 | menu item. | ||
| 414 | 430 | ||
| 415 | See also `mh-recursive-folders-flag'." | 431 | See also `mh-recursive-folders-flag'." |
| 416 | :type '(choice (const :tag "Inbox" t) | 432 | :type '(choice (const :tag "Inbox" t) |
| @@ -420,17 +436,20 @@ See also `mh-recursive-folders-flag'." | |||
| 420 | 436 | ||
| 421 | (defcustom mh-large-folder 200 | 437 | (defcustom mh-large-folder 200 |
| 422 | "The number of messages that indicates a large folder. | 438 | "The number of messages that indicates a large folder. |
| 423 | If a folder is deemed to be large, that is the number of messages in it exceed | 439 | |
| 424 | this value, then confirmation is needed when it is visited. Even when | 440 | If a folder is deemed to be large, that is the number of messages |
| 425 | `mh-show-threads-flag' is non-nil, the folder is not automatically threaded, if | 441 | in it exceed this value, then confirmation is needed when it is |
| 426 | it is large. If set to nil all folders are treated as if they are small." | 442 | visited. Even when `mh-show-threads-flag' is non-nil, the folder |
| 443 | is not automatically threaded, if it is large. If set to nil all | ||
| 444 | folders are treated as if they are small." | ||
| 427 | :type '(choice (const :tag "No Limit") integer) | 445 | :type '(choice (const :tag "No Limit") integer) |
| 428 | :group 'mh-folder) | 446 | :group 'mh-folder) |
| 429 | 447 | ||
| 430 | (defcustom mh-recenter-summary-flag nil | 448 | (defcustom mh-recenter-summary-flag nil |
| 431 | "*Non-nil means to recenter the summary window. | 449 | "*Non-nil means to recenter the summary window. |
| 432 | If this option is turned on, recenter the summary window when the show window | 450 | |
| 433 | is toggled off." | 451 | If this option is turned on, recenter the summary window when the |
| 452 | show window is toggled off." | ||
| 434 | :type 'boolean | 453 | :type 'boolean |
| 435 | :group 'mh-folder) | 454 | :group 'mh-folder) |
| 436 | 455 | ||
| @@ -443,9 +462,10 @@ is toggled off." | |||
| 443 | "*Additional arguments for \"sortm\"\\<mh-folder-mode-map>. | 462 | "*Additional arguments for \"sortm\"\\<mh-folder-mode-map>. |
| 444 | 463 | ||
| 445 | This option is consulted when a prefix argument is used with | 464 | This option is consulted when a prefix argument is used with |
| 446 | \\[mh-sort-folder]. Normally default arguments to \"sortm\" are specified in | 465 | \\[mh-sort-folder]. Normally default arguments to \"sortm\" are |
| 447 | the MH profile. This option may be used to provide an alternate view. For | 466 | specified in the MH profile. This option may be used to provide |
| 448 | example, \"'(\"-nolimit\" \"-textfield\" \"subject\")\" is a useful setting." | 467 | an alternate view. For example, \"'(\"-nolimit\" \"-textfield\" |
| 468 | \"subject\")\" is a useful setting." | ||
| 449 | :type 'string | 469 | :type 'string |
| 450 | :group 'mh-folder) | 470 | :group 'mh-folder) |
| 451 | 471 | ||
| @@ -455,23 +475,27 @@ example, \"'(\"-nolimit\" \"-textfield\" \"subject\")\" is a useful setting." | |||
| 455 | 475 | ||
| 456 | (defcustom mh-default-folder-for-message-function nil | 476 | (defcustom mh-default-folder-for-message-function nil |
| 457 | "Function to select a default folder for refiling or `Fcc'. | 477 | "Function to select a default folder for refiling or `Fcc'. |
| 458 | The current buffer is set to the message being refiled with point at the start | 478 | |
| 459 | of the message. This function should return the default folder as a string | 479 | The current buffer is set to the message being refiled with point |
| 460 | with a leading `+' sign. It can also return nil so that the last folder name | 480 | at the start of the message. This function should return the |
| 461 | is used as the default, or an empty string to suppress the default entirely." | 481 | default folder as a string with a leading `+' sign. It can also |
| 482 | return nil so that the last folder name is used as the default, | ||
| 483 | or an empty string to suppress the default entirely." | ||
| 462 | :type 'function | 484 | :type 'function |
| 463 | :group 'mh-folder-selection) | 485 | :group 'mh-folder-selection) |
| 464 | 486 | ||
| 465 | (defcustom mh-default-folder-list nil | 487 | (defcustom mh-default-folder-list nil |
| 466 | "*List of addresses and folders. | 488 | "*List of addresses and folders. |
| 467 | The folder name associated with the first address found in this list is used | 489 | |
| 468 | as the default for `mh-refile-msg' and similar functions. Each element in this | 490 | The folder name associated with the first address found in this |
| 469 | list contains a `Check Recipient' item. If this item is turned on, then the | 491 | list is used as the default for `mh-refile-msg' and similar |
| 470 | address is checked against the recipient instead of the sender. This is useful | 492 | functions. Each element in this list contains a `Check Recipient' |
| 471 | for mailing lists. | 493 | item. If this item is turned on, then the address is checked |
| 472 | 494 | against the recipient instead of the sender. This is useful for | |
| 473 | See `mh-prompt-for-refile-folder' and `mh-folder-from-address' for more | 495 | mailing lists. |
| 474 | information." | 496 | |
| 497 | See `mh-prompt-for-refile-folder' and `mh-folder-from-address' | ||
| 498 | for more information." | ||
| 475 | :type '(repeat (list (regexp :tag "Address") | 499 | :type '(repeat (list (regexp :tag "Address") |
| 476 | (string :tag "Folder") | 500 | (string :tag "Folder") |
| 477 | (boolean :tag "Check Recipient"))) | 501 | (boolean :tag "Check Recipient"))) |
| @@ -479,13 +503,14 @@ information." | |||
| 479 | 503 | ||
| 480 | (defcustom mh-default-folder-must-exist-flag t | 504 | (defcustom mh-default-folder-must-exist-flag t |
| 481 | "*Non-nil means guessed folder name must exist to be used. | 505 | "*Non-nil means guessed folder name must exist to be used. |
| 482 | If the derived folder does not exist, and this option is on, then the last | ||
| 483 | folder name used is suggested. This is useful if you get mail from various | ||
| 484 | people for whom you have an alias, but file them all in the same project | ||
| 485 | folder. | ||
| 486 | 506 | ||
| 487 | See `mh-prompt-for-refile-folder' and `mh-folder-from-address' for more | 507 | If the derived folder does not exist, and this option is on, then |
| 488 | information." | 508 | the last folder name used is suggested. This is useful if you get |
| 509 | mail from various people for whom you have an alias, but file | ||
| 510 | them all in the same project folder. | ||
| 511 | |||
| 512 | See `mh-prompt-for-refile-folder' and `mh-folder-from-address' | ||
| 513 | for more information." | ||
| 489 | :type 'boolean | 514 | :type 'boolean |
| 490 | :group 'mh-folder-selection) | 515 | :group 'mh-folder-selection) |
| 491 | 516 | ||
| @@ -493,8 +518,8 @@ information." | |||
| 493 | "*Prefix used for folder names generated from aliases. | 518 | "*Prefix used for folder names generated from aliases. |
| 494 | The prefix is used to prevent clutter in your mail directory. | 519 | The prefix is used to prevent clutter in your mail directory. |
| 495 | 520 | ||
| 496 | See `mh-prompt-for-refile-folder' and `mh-folder-from-address' for more | 521 | See `mh-prompt-for-refile-folder' and `mh-folder-from-address' |
| 497 | information." | 522 | for more information." |
| 498 | :type 'string | 523 | :type 'string |
| 499 | :group 'mh-folder-selection) | 524 | :group 'mh-folder-selection) |
| 500 | 525 | ||
| @@ -505,34 +530,38 @@ information." | |||
| 505 | (defcustom mh-identity-list nil | 530 | (defcustom mh-identity-list nil |
| 506 | "*List of identities. | 531 | "*List of identities. |
| 507 | 532 | ||
| 508 | To customize this option, click on the `INS' button and enter a label such as | 533 | To customize this option, click on the `INS' button and enter a label |
| 509 | `Home' or `Work'. Then click on the `INS' button with the label `Add at least | 534 | such as `Home' or `Work'. Then click on the `INS' button with the |
| 510 | one item below'. Then choose one of the items in the `Value Menu'. | 535 | label `Add at least one item below'. Then choose one of the items in |
| 511 | 536 | the `Value Menu'. | |
| 512 | You can specify an alternate `From:' header field using the `From Field' menu | 537 | |
| 513 | item. You must include a valid email address. A standard format is `First Last | 538 | You can specify an alternate `From:' header field using the `From |
| 514 | <login@@host.domain>'. If you use an initial with a period, then you must | 539 | Field' menu item. You must include a valid email address. A standard |
| 515 | quote your name as in `\"First I. Last\" <login@@host.domain>'. People usually | 540 | format is `First Last <login@@host.domain>'. If you use an initial |
| 516 | list the name of the company where they work using the `Organization Field' | 541 | with a period, then you must quote your name as in `\"First I. Last\" |
| 517 | menu item. Set any arbitrary header field and value in the `Other Field' menu | 542 | <login@@host.domain>'. People usually list the name of the company |
| 518 | item. Unless the header field is a standard one, precede the name of your | 543 | where they work using the `Organization Field' menu item. Set any |
| 544 | arbitrary header field and value in the `Other Field' menu item. | ||
| 545 | Unless the header field is a standard one, precede the name of your | ||
| 519 | field's label with `X-', as in `X-Fruit-of-the-Day:'. The value of | 546 | field's label with `X-', as in `X-Fruit-of-the-Day:'. The value of |
| 520 | `Attribution Verb' overrides the setting of | 547 | `Attribution Verb' overrides the setting of |
| 521 | `mh-extract-from-attribution-verb'. Set your signature with the `Signature' | 548 | `mh-extract-from-attribution-verb'. Set your signature with the |
| 522 | menu item. You can specify the contents of `mh-signature-file-name', a file, | 549 | `Signature' menu item. You can specify the contents of |
| 523 | or a function. Specify a different key to sign or encrypt messages with the | 550 | `mh-signature-file-name', a file, or a function. Specify a different |
| 524 | `GPG Key ID' menu item. | 551 | key to sign or encrypt messages with the `GPG Key ID' menu item. |
| 525 | 552 | ||
| 526 | You can select the identities you have added via the menu called `Identity' in | 553 | You can select the identities you have added via the menu called |
| 527 | the MH-Letter buffer. You can also use \\[mh-insert-identity]. To clear the | 554 | `Identity' in the MH-Letter buffer. You can also use |
| 528 | fields and signature added by the identity, select the `None' identity. | 555 | \\[mh-insert-identity]. To clear the fields and signature added by the |
| 529 | 556 | identity, select the `None' identity. | |
| 530 | The `Identity' menu contains two other items to save you from having to set | 557 | |
| 531 | the identity on every message. The menu item `Set Default for Session' can be | 558 | The `Identity' menu contains two other items to save you from having |
| 532 | used to set the default identity to the current identity until you exit Emacs. | 559 | to set the identity on every message. The menu item `Set Default for |
| 533 | The menu item `Save as Default' sets the option `mh-identity-default' to the | 560 | Session' can be used to set the default identity to the current |
| 534 | current identity setting. You can also customize the `mh-identity-default' | 561 | identity until you exit Emacs. The menu item `Save as Default' sets |
| 535 | option in the usual fashion." | 562 | the option `mh-identity-default' to the current identity setting. You |
| 563 | can also customize the `mh-identity-default' option in the usual | ||
| 564 | fashion." | ||
| 536 | :type '(repeat (list :tag "" | 565 | :type '(repeat (list :tag "" |
| 537 | (string :tag "Label") | 566 | (string :tag "Label") |
| 538 | (repeat :tag "Add at least one item below" | 567 | (repeat :tag "Add at least one item below" |
| @@ -567,37 +596,40 @@ option in the usual fashion." | |||
| 567 | (defcustom mh-auto-fields-list nil | 596 | (defcustom mh-auto-fields-list nil |
| 568 | "List of recipients for which header lines are automatically inserted. | 597 | "List of recipients for which header lines are automatically inserted. |
| 569 | 598 | ||
| 570 | This option can be used to set the identity depending on the recipient. To | 599 | This option can be used to set the identity depending on the |
| 571 | customize this option, click on the `INS' button and enter a regular | 600 | recipient. To customize this option, click on the `INS' button and |
| 572 | expression for the recipient's address. Click on the `INS' button with the | 601 | enter a regular expression for the recipient's address. Click on the |
| 573 | `Add at least one item below' label. Then choose one of the items in the | 602 | `INS' button with the `Add at least one item below' label. Then choose |
| 574 | `Value Menu'. | 603 | one of the items in the `Value Menu'. |
| 575 | 604 | ||
| 576 | The `Identity' menu item is used to select an identity from those configured | 605 | The `Identity' menu item is used to select an identity from those |
| 577 | in `mh-identity-list'. All of the information for that identity will be added | 606 | configured in `mh-identity-list'. All of the information for that |
| 578 | if the recipient matches. The `Fcc Field' menu item is used to select a folder | 607 | identity will be added if the recipient matches. The `Fcc Field' menu |
| 579 | that is used in the `Fcc:' header. When you send the message, MH will put a | 608 | item is used to select a folder that is used in the `Fcc:' header. |
| 580 | copy of your message in this folder. The `Mail-Followup-To Field' menu item is | 609 | When you send the message, MH will put a copy of your message in this |
| 581 | used to insert an `Mail-Followup-To:' header field with the recipients you | 610 | folder. The `Mail-Followup-To Field' menu item is used to insert an |
| 582 | provide. If the recipient's mail user agent supports this header field (as nmh | 611 | `Mail-Followup-To:' header field with the recipients you provide. If |
| 583 | does), then their replies will go to the addresses listed. This is useful if | 612 | the recipient's mail user agent supports this header field (as nmh |
| 584 | their replies go both to the list and to you and you don't have a mechanism to | 613 | does), then their replies will go to the addresses listed. This is |
| 585 | suppress duplicates. If you reply to someone not on the list, you must either | 614 | useful if their replies go both to the list and to you and you don't |
| 586 | remove the `Mail-Followup-To:' field, or ensure the recipient is also listed | 615 | have a mechanism to suppress duplicates. If you reply to someone not |
| 587 | there so that he receives replies to your reply. Other header fields may be | 616 | on the list, you must either remove the `Mail-Followup-To:' field, or |
| 588 | added using the `Other Field' menu item. | 617 | ensure the recipient is also listed there so that he receives replies |
| 589 | 618 | to your reply. Other header fields may be added using the `Other | |
| 590 | These fields can only be added after the recipient is known. Once the header | 619 | Field' menu item. |
| 591 | contains one or more recipients, run the \\[mh-insert-auto-fields] command or | 620 | |
| 592 | choose the `Identity -> Insert Auto Fields' menu item to insert these fields | 621 | These fields can only be added after the recipient is known. Once the |
| 593 | manually. However, you can just send the message and the fields will be added | 622 | header contains one or more recipients, run the |
| 594 | automatically. You are given a chance to see these fields and to confirm them | 623 | \\[mh-insert-auto-fields] command or choose the `Identity -> Insert |
| 595 | before the message is actually sent. You can do away with this confirmation by | 624 | Auto Fields' menu item to insert these fields manually. However, you |
| 596 | turning off the option `mh-auto-fields-prompt-flag'. | 625 | can just send the message and the fields will be added automatically. |
| 597 | 626 | You are given a chance to see these fields and to confirm them before | |
| 598 | You should avoid using the same header field in `mh-auto-fields-list' and | 627 | the message is actually sent. You can do away with this confirmation |
| 599 | `mh-identity-list' definitions that may apply to the same message as the | 628 | by turning off the option `mh-auto-fields-prompt-flag'. |
| 600 | result is undefined." | 629 | |
| 630 | You should avoid using the same header field in `mh-auto-fields-list' | ||
| 631 | and `mh-identity-list' definitions that may apply to the same message | ||
| 632 | as the result is undefined." | ||
| 601 | :type `(repeat | 633 | :type `(repeat |
| 602 | (list :tag "" | 634 | (list :tag "" |
| 603 | (string :tag "Recipient") | 635 | (string :tag "Recipient") |
| @@ -645,25 +677,28 @@ See `mh-identity-list'." | |||
| 645 | (":pgg-default-user-id" . mh-identity-handler-gpg-identity)) | 677 | (":pgg-default-user-id" . mh-identity-handler-gpg-identity)) |
| 646 | "Handler functions for fields in `mh-identity-list'. | 678 | "Handler functions for fields in `mh-identity-list'. |
| 647 | 679 | ||
| 648 | This option is used to change the way that fields, signatures, and | 680 | This option is used to change the way that fields, signatures, |
| 649 | attributions in `mh-identity-list' are added. To customize | 681 | and attributions in `mh-identity-list' are added. To customize |
| 650 | `mh-identity-handlers', replace the name of an existing handler function | 682 | `mh-identity-handlers', replace the name of an existing handler |
| 651 | associated with the field you want to change with the name of a function you | 683 | function associated with the field you want to change with the |
| 652 | have written. You can also click on an `INS' button and insert a field of your | 684 | name of a function you have written. You can also click on an |
| 653 | choice and the name of the function you have written to handle it. | 685 | `INS' button and insert a field of your choice and the name of |
| 686 | the function you have written to handle it. | ||
| 654 | 687 | ||
| 655 | The `Field' field can be any field that you've used in your | 688 | The `Field' field can be any field that you've used in your |
| 656 | `mh-identity-list'. The special fields `:attribution-verb', `:signature', or | 689 | `mh-identity-list'. The special fields `:attribution-verb', |
| 657 | `:pgg-default-user-id' are used for the `mh-identity-list' choices | 690 | `:signature', or `:pgg-default-user-id' are used for the |
| 658 | `Attribution Verb', `Signature', and `GPG Key ID' respectively. | 691 | `mh-identity-list' choices `Attribution Verb', `Signature', and |
| 659 | 692 | `GPG Key ID' respectively. | |
| 660 | The handler associated with the `:default' field is used when no other field | 693 | |
| 661 | matches. | 694 | The handler associated with the `:default' field is used when no |
| 662 | 695 | other field matches. | |
| 663 | The handler functions are passed two or three arguments: the FIELD itself (for | 696 | |
| 664 | example, `From'), or one of the special fields (for example, `:signature'), | 697 | The handler functions are passed two or three arguments: the |
| 665 | and the ACTION `'remove' or `'add'. If the action is `'add', an additional | 698 | FIELD itself (for example, `From'), or one of the special |
| 666 | argument containing the VALUE for the field is given." | 699 | fields (for example, `:signature'), and the ACTION `'remove' or |
| 700 | `'add'. If the action is `'add', an additional argument | ||
| 701 | containing the VALUE for the field is given." | ||
| 667 | :type '(repeat (cons (string :tag "Field") function)) | 702 | :type '(repeat (cons (string :tag "Field") function)) |
| 668 | :group 'mh-identity) | 703 | :group 'mh-identity) |
| 669 | 704 | ||
| @@ -674,23 +709,25 @@ argument containing the VALUE for the field is given." | |||
| 674 | (defcustom mh-inc-prog "inc" | 709 | (defcustom mh-inc-prog "inc" |
| 675 | "*Program to incorporate new mail into a folder. | 710 | "*Program to incorporate new mail into a folder. |
| 676 | 711 | ||
| 677 | This program generates a one-line summary for each of the new messages. Unless | 712 | This program generates a one-line summary for each of the new |
| 678 | it is an absolute pathname, the file is assumed to be in the `mh-progs' | 713 | messages. Unless it is an absolute pathname, the file is assumed |
| 679 | directory. You may also link a file to `inc' that uses a different format. | 714 | to be in the `mh-progs' directory. You may also link a file to |
| 680 | You'll then need to modify several scan line format variables appropriately." | 715 | `inc' that uses a different format. You'll then need to modify |
| 716 | several scan line format variables appropriately." | ||
| 681 | :type 'string | 717 | :type 'string |
| 682 | :group 'mh-inc) | 718 | :group 'mh-inc) |
| 683 | 719 | ||
| 684 | (defcustom mh-inc-spool-list nil | 720 | (defcustom mh-inc-spool-list nil |
| 685 | "*Alternate spool files. | 721 | "*Alternate spool files. |
| 686 | 722 | ||
| 687 | You can use the `mh-inc-spool-list' variable to direct MH-E to retrieve mail | 723 | You can use the `mh-inc-spool-list' variable to direct MH-E to |
| 688 | from arbitrary spool files other than your system mailbox, file it in folders | 724 | retrieve mail from arbitrary spool files other than your system |
| 689 | other than your `+inbox', and assign key bindings to incorporate this mail. | 725 | mailbox, file it in folders other than your `+inbox', and assign |
| 726 | key bindings to incorporate this mail. | ||
| 690 | 727 | ||
| 691 | Suppose you are subscribed to the `mh-e-devel' mailing list and you use | 728 | Suppose you are subscribed to the `mh-e-devel' mailing list and |
| 692 | `procmail' to filter this mail into `~/mail/mh-e' with the following recipe in | 729 | you use `procmail' to filter this mail into `~/mail/mh-e' with |
| 693 | `.procmailrc': | 730 | the following recipe in `.procmailrc': |
| 694 | 731 | ||
| 695 | MAILDIR=$HOME/mail | 732 | MAILDIR=$HOME/mail |
| 696 | :0: | 733 | :0: |
| @@ -698,12 +735,12 @@ Suppose you are subscribed to the `mh-e-devel' mailing list and you use | |||
| 698 | mh-e | 735 | mh-e |
| 699 | 736 | ||
| 700 | In order to incorporate `~/mail/mh-e' into `+mh-e' with an `I m' | 737 | In order to incorporate `~/mail/mh-e' into `+mh-e' with an `I m' |
| 701 | \(`mh-inc-spool-mh-e'\) command, customize this option, and click on the `INS' | 738 | \(`mh-inc-spool-mh-e'\) command, customize this option, and click |
| 702 | button. Enter a `Spool File' of `~/mail/mh-e', a `Folder' of `mh-e', and a | 739 | on the `INS' button. Enter a `Spool File' of `~/mail/mh-e', a |
| 703 | `Key Binding' of `m'. | 740 | `Folder' of `mh-e', and a `Key Binding' of `m'. |
| 704 | 741 | ||
| 705 | You can use `xbuffy' to automate the incorporation of this mail using the | 742 | You can use `xbuffy' to automate the incorporation of this mail |
| 706 | `gnudoit' command in the `gnuserv' package as follows: | 743 | using the `gnudoit' command in the `gnuserv' package as follows: |
| 707 | 744 | ||
| 708 | box ~/mail/mh-e | 745 | box ~/mail/mh-e |
| 709 | title mh-e | 746 | title mh-e |
| @@ -723,13 +760,15 @@ You can use `xbuffy' to automate the incorporation of this mail using the | |||
| 723 | 760 | ||
| 724 | (defcustom mh-index-program nil | 761 | (defcustom mh-index-program nil |
| 725 | "Indexing program that MH-E shall use. | 762 | "Indexing program that MH-E shall use. |
| 726 | The default setting of this option is `Auto-detect' which means that MH-E will | ||
| 727 | automatically choose one of swish++, swish-e, mairix, namazu, pick and grep in | ||
| 728 | that order. If, for example, you have both swish++ and mairix installed and | ||
| 729 | you want to use mairix, then you can set this option to `mairix'. | ||
| 730 | 763 | ||
| 731 | More information about setting up an indexing program to use with MH-E can be | 764 | The default setting of this option is `Auto-detect' which means |
| 732 | found in the documentation of `mh-index-search'." | 765 | that MH-E will automatically choose one of swish++, swish-e, |
| 766 | mairix, namazu, pick and grep in that order. If, for example, you | ||
| 767 | have both swish++ and mairix installed and you want to use | ||
| 768 | mairix, then you can set this option to `mairix'. | ||
| 769 | |||
| 770 | More information about setting up an indexing program to use with | ||
| 771 | MH-E can be found in the documentation of `mh-index-search'." | ||
| 733 | :type '(choice (const :tag "Auto-detect" nil) | 772 | :type '(choice (const :tag "Auto-detect" nil) |
| 734 | (const :tag "swish++" swish++) | 773 | (const :tag "swish++" swish++) |
| 735 | (const :tag "swish-e" swish) | 774 | (const :tag "swish-e" swish) |
| @@ -752,13 +791,17 @@ found in the documentation of `mh-index-search'." | |||
| 752 | (bogofilter mh-bogofilter-blacklist mh-bogofilter-whitelist) | 791 | (bogofilter mh-bogofilter-blacklist mh-bogofilter-whitelist) |
| 753 | (spamprobe mh-spamprobe-blacklist mh-spamprobe-whitelist)) | 792 | (spamprobe mh-spamprobe-blacklist mh-spamprobe-whitelist)) |
| 754 | "Available choices of spam programs to use. | 793 | "Available choices of spam programs to use. |
| 755 | This is an alist. For each element there are functions that blacklist a message | 794 | |
| 756 | as spam and whitelist a message incorrectly classified as spam.") | 795 | This is an alist. For each element there are functions that |
| 796 | blacklist a message as spam and whitelist a message incorrectly | ||
| 797 | classified as spam.") | ||
| 757 | 798 | ||
| 758 | (defun mh-junk-choose (symbol value) | 799 | (defun mh-junk-choose (symbol value) |
| 759 | "Choose spam program to use. | 800 | "Choose spam program to use. |
| 760 | The function is always called with SYMBOL bound to `mh-junk-program' and VALUE | 801 | |
| 761 | bound to the new value of `mh-junk-program'. The function sets the variable | 802 | The function is always called with SYMBOL bound to |
| 803 | `mh-junk-program' and VALUE bound to the new value of | ||
| 804 | `mh-junk-program'. The function sets the variable | ||
| 762 | `mh-junk-choice' in addition to `mh-junk-program'." | 805 | `mh-junk-choice' in addition to `mh-junk-program'." |
| 763 | (set symbol value) | 806 | (set symbol value) |
| 764 | (setq mh-junk-choice | 807 | (setq mh-junk-choice |
| @@ -770,9 +813,11 @@ bound to the new value of `mh-junk-program'. The function sets the variable | |||
| 770 | ;; User customizable variables | 813 | ;; User customizable variables |
| 771 | (defcustom mh-junk-background nil | 814 | (defcustom mh-junk-background nil |
| 772 | "If on, spam programs are run in background. | 815 | "If on, spam programs are run in background. |
| 773 | By default, the programs are run in the foreground, but this can be slow when | 816 | |
| 774 | junking large numbers of messages. If you have enough memory or don't junk | 817 | By default, the programs are run in the foreground, but this can |
| 775 | that many messages at the same time, you might try turning on this option." | 818 | be slow when junking large numbers of messages. If you have |
| 819 | enough memory or don't junk that many messages at the same time, | ||
| 820 | you might try turning on this option." | ||
| 776 | :type '(choice (const :tag "Off" nil) | 821 | :type '(choice (const :tag "Off" nil) |
| 777 | (const :tag "On" 0)) | 822 | (const :tag "On" 0)) |
| 778 | :group 'mh-junk) | 823 | :group 'mh-junk) |
| @@ -786,11 +831,11 @@ that many messages at the same time, you might try turning on this option." | |||
| 786 | (defcustom mh-junk-program nil | 831 | (defcustom mh-junk-program nil |
| 787 | "Spam program that MH-E should use. | 832 | "Spam program that MH-E should use. |
| 788 | 833 | ||
| 789 | The default setting of this option is \"Auto-detect\" which means that MH-E | 834 | The default setting of this option is \"Auto-detect\" which means |
| 790 | will automatically choose one of SpamAssassin, bogofilter, or SpamProbe in | 835 | that MH-E will automatically choose one of SpamAssassin, |
| 791 | that order. If, for example, you have both SpamAssassin and bogofilter | 836 | bogofilter, or SpamProbe in that order. If, for example, you have |
| 792 | installed and you want to use bogofilter, then you can set this option to | 837 | both SpamAssassin and bogofilter installed and you want to use |
| 793 | \"Bogofilter\"." | 838 | bogofilter, then you can set this option to \"Bogofilter\"." |
| 794 | :type '(choice (const :tag "Auto-detect" nil) | 839 | :type '(choice (const :tag "Auto-detect" nil) |
| 795 | (const :tag "SpamAssassin" spamassassin) | 840 | (const :tag "SpamAssassin" spamassassin) |
| 796 | (const :tag "Bogofilter" bogofilter) | 841 | (const :tag "Bogofilter" bogofilter) |
| @@ -804,11 +849,13 @@ installed and you want to use bogofilter, then you can set this option to | |||
| 804 | 849 | ||
| 805 | (defcustom mh-compose-insertion (if (locate-library "mml") 'mml 'mh) | 850 | (defcustom mh-compose-insertion (if (locate-library "mml") 'mml 'mh) |
| 806 | "Type of tags used when composing MIME messages. | 851 | "Type of tags used when composing MIME messages. |
| 807 | In addition to MH-style directives, MH-E also supports MML (MIME Meta | 852 | |
| 808 | Language) tags. (see Info node `(emacs-mime)Composing'). This option can be | 853 | In addition to MH-style directives, MH-E also supports MML (MIME |
| 809 | used to choose between them. By default, this option is set to \"MML\" if it | 854 | Meta Language) tags. (see Info node `(emacs-mime)Composing'). |
| 810 | is supported since it provides a lot more functionality. This option can also | 855 | This option can be used to choose between them. By default, this |
| 811 | be set to \"MH\" if MH-style directives are preferred." | 856 | option is set to \"MML\" if it is supported since it provides a |
| 857 | lot more functionality. This option can also be set to \"MH\" if | ||
| 858 | MH-style directives are preferred." | ||
| 812 | :type '(choice (const :tag "MML" mml) | 859 | :type '(choice (const :tag "MML" mml) |
| 813 | (const :tag "MH" mh)) | 860 | (const :tag "MH" mh)) |
| 814 | :group 'mh-letter) | 861 | :group 'mh-letter) |
| @@ -827,18 +874,20 @@ be set to \"MH\" if MH-style directives are preferred." | |||
| 827 | 874 | ||
| 828 | (defcustom mh-delete-yanked-msg-window-flag nil | 875 | (defcustom mh-delete-yanked-msg-window-flag nil |
| 829 | "*Non-nil means delete any window displaying the message. | 876 | "*Non-nil means delete any window displaying the message. |
| 830 | This deletes the window containing the original message after yanking it with | 877 | |
| 831 | \\<mh-letter-mode-map>\\[mh-yank-cur-msg] to make more room on your screen for | 878 | This deletes the window containing the original message after |
| 832 | your reply." | 879 | yanking it with \\<mh-letter-mode-map>\\[mh-yank-cur-msg] to make |
| 880 | more room on your screen for your reply." | ||
| 833 | :type 'boolean | 881 | :type 'boolean |
| 834 | :group 'mh-letter) | 882 | :group 'mh-letter) |
| 835 | 883 | ||
| 836 | (defcustom mh-extract-from-attribution-verb "wrote:" | 884 | (defcustom mh-extract-from-attribution-verb "wrote:" |
| 837 | "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]. | 885 | "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]. |
| 838 | The attribution consists of the sender's name and email address followed by | 886 | |
| 839 | the content of this option. This option can be set to \"wrote:\", \"a | 887 | The attribution consists of the sender's name and email address |
| 840 | écrit:\", and \"schrieb:\". You can also use the \"Custom String\" menu item | 888 | followed by the content of this option. This option can be set to |
| 841 | to enter your own verb." | 889 | \"wrote:\", \"a écrit:\", and \"schrieb:\". You can also use the |
| 890 | \"Custom String\" menu item to enter your own verb." | ||
| 842 | :type '(choice (const "wrote:") | 891 | :type '(choice (const "wrote:") |
| 843 | (const "a écrit:") | 892 | (const "a écrit:") |
| 844 | (const "schrieb:") | 893 | (const "schrieb:") |
| @@ -847,43 +896,51 @@ to enter your own verb." | |||
| 847 | 896 | ||
| 848 | (defcustom mh-ins-buf-prefix "> " | 897 | (defcustom mh-ins-buf-prefix "> " |
| 849 | "*String to put before each line of a yanked or inserted message. | 898 | "*String to put before each line of a yanked or inserted message. |
| 850 | The prefix \"> \" is the default setting of this option. I suggest that you | ||
| 851 | not modify this option since it is used by many mailers and news readers: | ||
| 852 | messages are far easier to read if several included messages have all been | ||
| 853 | indented by the same string. | ||
| 854 | 899 | ||
| 855 | This prefix is not inserted if you use one of the supercite flavors of | 900 | The prefix \"> \" is the default setting of this option. I |
| 856 | `mh-yank-behavior' or you have added a `mail-citation-hook'." | 901 | suggest that you not modify this option since it is used by many |
| 902 | mailers and news readers: messages are far easier to read if | ||
| 903 | several included messages have all been indented by the same | ||
| 904 | string. | ||
| 905 | |||
| 906 | This prefix is not inserted if you use one of the supercite | ||
| 907 | flavors of `mh-yank-behavior' or you have added a | ||
| 908 | `mail-citation-hook'." | ||
| 857 | :type 'string | 909 | :type 'string |
| 858 | :group 'mh-letter) | 910 | :group 'mh-letter) |
| 859 | 911 | ||
| 860 | (defcustom mh-letter-complete-function 'ispell-complete-word | 912 | (defcustom mh-letter-complete-function 'ispell-complete-word |
| 861 | "*Function to call when completing outside of address or folder fields. | 913 | "*Function to call when completing outside of address or folder fields. |
| 862 | In the body of the message, \\<mh-letter-mode-map>\\[mh-letter-complete] runs | 914 | |
| 863 | this function, which is set to \"ispell-complete-word\" by default." | 915 | In the body of the message, |
| 916 | \\<mh-letter-mode-map>\\[mh-letter-complete] runs this function, | ||
| 917 | which is set to \"ispell-complete-word\" by default." | ||
| 864 | :type '(choice function (const nil)) | 918 | :type '(choice function (const nil)) |
| 865 | :group 'mh-letter) | 919 | :group 'mh-letter) |
| 866 | 920 | ||
| 867 | (defcustom mh-letter-fill-column 72 | 921 | (defcustom mh-letter-fill-column 72 |
| 868 | "*Fill column to use in MH Letter mode. | 922 | "*Fill column to use in MH Letter mode. |
| 869 | By default, this option is 72 to allow others to quote your message without | 923 | |
| 870 | line wrapping." | 924 | By default, this option is 72 to allow others to quote your |
| 925 | message without line wrapping." | ||
| 871 | :type 'integer | 926 | :type 'integer |
| 872 | :group 'mh-letter) | 927 | :group 'mh-letter) |
| 873 | 928 | ||
| 874 | (defcustom mh-mml-method-default (if mh-pgp-support-flag "pgpmime" "none") | 929 | (defcustom mh-mml-method-default (if mh-pgp-support-flag "pgpmime" "none") |
| 875 | "Default method to use in security tags. | 930 | "Default method to use in security tags. |
| 876 | This option is used to select between a variety of mail security mechanisms. | ||
| 877 | The default is \"PGP (MIME)\" if it is supported\; otherwise, the default is | ||
| 878 | \"None\". Other mechanisms include vanilla \"PGP\" and \"S/MIME\". | ||
| 879 | 931 | ||
| 880 | The `pgg' customization group may have some settings which may interest you | 932 | This option is used to select between a variety of mail security |
| 881 | \(see Info node `(pgg)'). | 933 | mechanisms. The default is \"PGP (MIME)\" if it is supported\; |
| 934 | otherwise, the default is \"None\". Other mechanisms include | ||
| 935 | vanilla \"PGP\" and \"S/MIME\". | ||
| 882 | 936 | ||
| 883 | In particular, I set the option `pgg-encrypt-for-me' to t so that all messages | 937 | The `pgg' customization group may have some settings which may |
| 884 | I encrypt are encrypted with my public key as well. If you keep a copy of all | 938 | interest you \(see Info node `(pgg)'). |
| 885 | of your outgoing mail with a \"Fcc:\" header field, this setting is vital so | 939 | |
| 886 | that you can read the mail you write!" | 940 | In particular, I set the option `pgg-encrypt-for-me' to t so that all |
| 941 | messages I encrypt are encrypted with my public key as well. If you | ||
| 942 | keep a copy of all of your outgoing mail with a \"Fcc:\" header field, | ||
| 943 | this setting is vital so that you can read the mail you write!" | ||
| 887 | :type '(choice (const :tag "PGP (MIME)" "pgpmime") | 944 | :type '(choice (const :tag "PGP (MIME)" "pgpmime") |
| 888 | (const :tag "PGP" "pgp") | 945 | (const :tag "PGP" "pgp") |
| 889 | (const :tag "S/MIME" "smime") | 946 | (const :tag "S/MIME" "smime") |
| @@ -914,72 +971,76 @@ The signature is inserted into your message with the command | |||
| 914 | 971 | ||
| 915 | (defcustom mh-signature-separator-flag t | 972 | (defcustom mh-signature-separator-flag t |
| 916 | "*Non-nil means a signature separator should be inserted. | 973 | "*Non-nil means a signature separator should be inserted. |
| 917 | It is not recommended that you change this option since various mail user | 974 | |
| 918 | agents, including MH-E, use the separator to present the signature | 975 | It is not recommended that you change this option since various |
| 919 | differently, and to suppress the signature when replying or yanking a letter | 976 | mail user agents, including MH-E, use the separator to present |
| 920 | into a draft." | 977 | the signature differently, and to suppress the signature when |
| 978 | replying or yanking a letter into a draft." | ||
| 921 | :type 'boolean | 979 | :type 'boolean |
| 922 | :group 'mh-letter) | 980 | :group 'mh-letter) |
| 923 | 981 | ||
| 924 | (defcustom mh-x-face-file "~/.face" | 982 | (defcustom mh-x-face-file "~/.face" |
| 925 | "*File containing face header field to insert in outgoing mail. | 983 | "*File containing face header field to insert in outgoing mail. |
| 926 | 984 | ||
| 927 | If the file starts with either of the strings \"X-Face:\", \"Face:\" or | 985 | If the file starts with either of the strings \"X-Face:\", \"Face:\" |
| 928 | \"X-Image-URL:\" then the contents are added to the message header verbatim. | 986 | or \"X-Image-URL:\" then the contents are added to the message header |
| 929 | Otherwise it is assumed that the file contains the value of the \"X-Face:\" | 987 | verbatim. Otherwise it is assumed that the file contains the value of |
| 930 | header field. | 988 | the \"X-Face:\" header field. |
| 931 | 989 | ||
| 932 | The \"X-Face:\" header field, which is a low-resolution, black | 990 | The \"X-Face:\" header field, which is a low-resolution, black and |
| 933 | and white image, can be generated using the \"compface\" command | 991 | white image, can be generated using the \"compface\" command (see URL |
| 934 | \(see URL `ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z'). | 992 | `ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.Z'). The |
| 935 | The \"Online X-Face Converter\" is a useful resource for quick | 993 | \"Online X-Face Converter\" is a useful resource for quick conversion |
| 936 | conversion of images into \"X-Face:\" header fields (see URL | 994 | of images into \"X-Face:\" header fields (see URL |
| 937 | `http://www.dairiki.org/xface/'). | 995 | `http://www.dairiki.org/xface/'). |
| 938 | 996 | ||
| 939 | Use the \"make-face\" script to convert a JPEG image to the | 997 | Use the \"make-face\" script to convert a JPEG image to the higher |
| 940 | higher resolution, color, \"Face:\" header field (see URL | 998 | resolution, color, \"Face:\" header field (see URL |
| 941 | `http://quimby.gnus.org/circus/face/make-face'). | 999 | `http://quimby.gnus.org/circus/face/make-face'). |
| 942 | 1000 | ||
| 943 | The URL of any image can be used for the \"X-Image-URL:\" field and no | 1001 | The URL of any image can be used for the \"X-Image-URL:\" field and no |
| 944 | processing of the image is required. | 1002 | processing of the image is required. |
| 945 | 1003 | ||
| 946 | To prevent the setting of any of these header fields, either set | 1004 | To prevent the setting of any of these header fields, either set |
| 947 | `mh-x-face-file' to nil, or simply ensure that the file defined by this option | 1005 | `mh-x-face-file' to nil, or simply ensure that the file defined by |
| 948 | doesn't exist." | 1006 | this option doesn't exist." |
| 949 | :type 'file | 1007 | :type 'file |
| 950 | :group 'mh-letter) | 1008 | :group 'mh-letter) |
| 951 | 1009 | ||
| 952 | (defcustom mh-yank-behavior 'attribution | 1010 | (defcustom mh-yank-behavior 'attribution |
| 953 | "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]. | 1011 | "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]. |
| 954 | 1012 | ||
| 955 | To include the entire message, including the entire header, use \"Body and | 1013 | To include the entire message, including the entire header, use \"Body |
| 956 | Header\". Use \"Body\" to yank just the body without the header. To yank only | 1014 | and Header\". Use \"Body\" to yank just the body without the header. |
| 957 | the portion of the message following the point, set this option to \"Below | 1015 | To yank only the portion of the message following the point, set this |
| 958 | Point\". | 1016 | option to \"Below Point\". |
| 959 | 1017 | ||
| 960 | Choose \"Invoke supercite\" to pass the entire message and header through | 1018 | Choose \"Invoke supercite\" to pass the entire message and header |
| 961 | supercite. | 1019 | through supercite. |
| 962 | 1020 | ||
| 963 | If the \"Body With Attribution\" setting is used, then the message minus the | 1021 | If the \"Body With Attribution\" setting is used, then the message |
| 964 | header is yanked and a simple attribution line is added at the top using the | 1022 | minus the header is yanked and a simple attribution line is added at |
| 965 | value of the `mh-extract-from-attribution-verb' option. This is the default. | 1023 | the top using the value of the `mh-extract-from-attribution-verb' |
| 966 | 1024 | option. This is the default. | |
| 967 | If the \"Invoke supercite\" or \"Body With Attribution\" settings are used, | 1025 | |
| 968 | the \"-noformat\" argument is passed to the \"repl\" program to override a | 1026 | If the \"Invoke supercite\" or \"Body With Attribution\" settings are |
| 969 | \"-filter\" or \"-format\" argument. These settings also have | 1027 | used, the \"-noformat\" argument is passed to the \"repl\" program to |
| 970 | \"Automatically\" variants that perform the action automatically when you | 1028 | override a \"-filter\" or \"-format\" argument. These settings also |
| 971 | reply so that you don't need to use \\[mh-yank-cur-msg] at all. Note that this | 1029 | have \"Automatically\" variants that perform the action automatically |
| 972 | automatic action is only performed if the show buffer matches the message | 1030 | when you reply so that you don't need to use \\[mh-yank-cur-msg] at |
| 973 | being replied to. People who use the automatic variants tend to turn on the | 1031 | all. Note that this automatic action is only performed if the show |
| 974 | `mh-delete-yanked-msg-window-flag' option as well so that the show window is | 1032 | buffer matches the message being replied to. People who use the |
| 975 | never displayed. | 1033 | automatic variants tend to turn on the |
| 976 | 1034 | `mh-delete-yanked-msg-window-flag' option as well so that the show | |
| 977 | If the show buffer has a region, the `mh-yank-behavior' option is ignored | 1035 | window is never displayed. |
| 978 | unless its value is one of Attribution variants in which case the attribution | 1036 | |
| 979 | is added to the yanked region. | 1037 | If the show buffer has a region, the `mh-yank-behavior' option is |
| 1038 | ignored unless its value is one of Attribution variants in which case | ||
| 1039 | the attribution is added to the yanked region. | ||
| 980 | 1040 | ||
| 981 | If this option is set to one of the supercite flavors, the hook | 1041 | If this option is set to one of the supercite flavors, the hook |
| 982 | `mail-citation-hook' is ignored and `mh-ins-buf-prefix' is not inserted." | 1042 | `mail-citation-hook' is ignored and `mh-ins-buf-prefix' is not |
| 1043 | inserted." | ||
| 983 | :type '(choice (const :tag "Body and Header" t) | 1044 | :type '(choice (const :tag "Body and Header" t) |
| 984 | (const :tag "Body" body) | 1045 | (const :tag "Body" body) |
| 985 | (const :tag "Below Point" nil) | 1046 | (const :tag "Below Point" nil) |
| @@ -996,10 +1057,11 @@ If this option is set to one of the supercite flavors, the hook | |||
| 996 | 1057 | ||
| 997 | (defcustom mh-interpret-number-as-range-flag t | 1058 | (defcustom mh-interpret-number-as-range-flag t |
| 998 | "*Non-nil means interpret a number as a range. | 1059 | "*Non-nil means interpret a number as a range. |
| 999 | Since one of the most frequent ranges used is \"last:N\", MH-E will interpret | 1060 | |
| 1000 | input such as \"200\" as \"last:200\" if this option is on (which is the | 1061 | Since one of the most frequent ranges used is \"last:N\", MH-E |
| 1001 | default). If you need to scan just the message 200, then use the range | 1062 | will interpret input such as \"200\" as \"last:200\" if this |
| 1002 | \"200:200\"." | 1063 | option is on (which is the default). If you need to scan just the |
| 1064 | message 200, then use the range \"200:200\"." | ||
| 1003 | :type 'boolean | 1065 | :type 'boolean |
| 1004 | :group 'mh-ranges) | 1066 | :group 'mh-ranges) |
| 1005 | 1067 | ||
| @@ -1012,8 +1074,9 @@ default). If you need to scan just the message 200, then use the range | |||
| 1012 | 1074 | ||
| 1013 | (defun mh-adaptive-cmd-note-flag-check (symbol value) | 1075 | (defun mh-adaptive-cmd-note-flag-check (symbol value) |
| 1014 | "Check if desired setting is legal. | 1076 | "Check if desired setting is legal. |
| 1015 | Throw an error if user tries to turn on `mh-adaptive-cmd-note-flag' when | 1077 | Throw an error if user tries to turn on |
| 1016 | `mh-scan-format-file' isn't t. Otherwise, set SYMBOL to VALUE." | 1078 | `mh-adaptive-cmd-note-flag' when `mh-scan-format-file' isn't t. |
| 1079 | Otherwise, set SYMBOL to VALUE." | ||
| 1017 | (if (and value | 1080 | (if (and value |
| 1018 | (not (eq mh-scan-format-file t))) | 1081 | (not (eq mh-scan-format-file t))) |
| 1019 | (error "%s %s" "Can't turn on unless mh-scan-format-file" | 1082 | (error "%s %s" "Can't turn on unless mh-scan-format-file" |
| @@ -1022,8 +1085,9 @@ Throw an error if user tries to turn on `mh-adaptive-cmd-note-flag' when | |||
| 1022 | 1085 | ||
| 1023 | (defun mh-scan-format-file-check (symbol value) | 1086 | (defun mh-scan-format-file-check (symbol value) |
| 1024 | "Check if desired setting is legal. | 1087 | "Check if desired setting is legal. |
| 1025 | Throw an error if user tries to set `mh-scan-format-file' to anything but t | 1088 | Throw an error if user tries to set `mh-scan-format-file' to |
| 1026 | when `mh-adaptive-cmd-note-flag' is on. Otherwise, set SYMBOL to VALUE." | 1089 | anything but t when `mh-adaptive-cmd-note-flag' is on. Otherwise, |
| 1090 | set SYMBOL to VALUE." | ||
| 1027 | (if (and (not (eq value t)) | 1091 | (if (and (not (eq value t)) |
| 1028 | (eq mh-adaptive-cmd-note-flag t)) | 1092 | (eq mh-adaptive-cmd-note-flag t)) |
| 1029 | (error "%s %s" "You must turn off mh-adaptive-cmd-note-flag" | 1093 | (error "%s %s" "You must turn off mh-adaptive-cmd-note-flag" |
| @@ -1032,16 +1096,17 @@ when `mh-adaptive-cmd-note-flag' is on. Otherwise, set SYMBOL to VALUE." | |||
| 1032 | 1096 | ||
| 1033 | (defcustom mh-adaptive-cmd-note-flag t | 1097 | (defcustom mh-adaptive-cmd-note-flag t |
| 1034 | "*Non-nil means that the message number width is determined dynamically. | 1098 | "*Non-nil means that the message number width is determined dynamically. |
| 1035 | If you've created your own format to handle long message numbers, you'll be | 1099 | |
| 1036 | pleased to know you no longer need it since MH-E adapts its internal format | 1100 | If you've created your own format to handle long message numbers, |
| 1037 | based upon the largest message number if this option is on (the default). | 1101 | you'll be pleased to know you no longer need it since MH-E adapts its |
| 1038 | This option may only be turned on when `mh-scan-format-file' is set to \"Use | 1102 | internal format based upon the largest message number if this option |
| 1039 | MH-E scan Format\". | 1103 | is on (the default). This option may only be turned on when |
| 1040 | 1104 | `mh-scan-format-file' is set to \"Use MH-E scan Format\". | |
| 1041 | If you prefer fixed-width message numbers, turn off this option and call | 1105 | |
| 1042 | `mh-set-cmd-note' with the width specified by your format file | 1106 | If you prefer fixed-width message numbers, turn off this option and |
| 1043 | \(see `mh-scan-format-file'). For example, the default width is 4, so you would | 1107 | call `mh-set-cmd-note' with the width specified by your format file |
| 1044 | use \"(mh-set-cmd-note 4)\"." | 1108 | \(see `mh-scan-format-file'). For example, the default width is 4, so |
| 1109 | you would use \"(mh-set-cmd-note 4)\"." | ||
| 1045 | :type 'boolean | 1110 | :type 'boolean |
| 1046 | :group 'mh-scan-line-formats | 1111 | :group 'mh-scan-line-formats |
| 1047 | :set 'mh-adaptive-cmd-note-flag-check) | 1112 | :set 'mh-adaptive-cmd-note-flag-check) |
| @@ -1049,22 +1114,24 @@ use \"(mh-set-cmd-note 4)\"." | |||
| 1049 | (defcustom mh-scan-format-file t | 1114 | (defcustom mh-scan-format-file t |
| 1050 | "Specifies the format file to pass to the scan program. | 1115 | "Specifies the format file to pass to the scan program. |
| 1051 | 1116 | ||
| 1052 | The default setting for this option is \"Use MH-E scan Format\". This means | 1117 | The default setting for this option is \"Use MH-E scan Format\". This |
| 1053 | that the format string will be taken from the either `mh-scan-format-mh' or | 1118 | means that the format string will be taken from the either |
| 1054 | `mh-scan-format-nmh' depending on whether MH or nmh (or GNU mailutils) is in | 1119 | `mh-scan-format-mh' or `mh-scan-format-nmh' depending on whether MH or |
| 1055 | use. This setting also enables you to turn on the `mh-adaptive-cmd-note-flag' | 1120 | nmh (or GNU mailutils) is in use. This setting also enables you to |
| 1056 | option. | 1121 | turn on the `mh-adaptive-cmd-note-flag' option. |
| 1057 | 1122 | ||
| 1058 | You can also set this option to \"Use Default scan Format\" to get the | 1123 | You can also set this option to \"Use Default scan Format\" to get the |
| 1059 | same output as you would get if you ran \"scan\" from the shell. If you have a | 1124 | same output as you would get if you ran \"scan\" from the shell. If |
| 1060 | format file that you want MH-E to use but not MH, you can set this option to | 1125 | you have a format file that you want MH-E to use but not MH, you can |
| 1061 | \"Specify a scan Format File\" and enter the name of your format file. | 1126 | set this option to \"Specify a scan Format File\" and enter the name |
| 1062 | 1127 | of your format file. | |
| 1063 | If you change the format of the scan lines you'll need to tell MH-E how to | 1128 | |
| 1064 | parse the new format. As you will see, quite a lot of variables are involved | 1129 | If you change the format of the scan lines you'll need to tell MH-E |
| 1065 | to do that. Use \"\\[apropos] RET mh-scan.*regexp\" to obtain a list of these | 1130 | how to parse the new format. As you will see, quite a lot of variables |
| 1066 | variables. You will also have to call `mh-set-cmd-note' if your notations are | 1131 | are involved to do that. Use \"\\[apropos] RET mh-scan.*regexp\" to |
| 1067 | not in column 4 (columns in Emacs start with 0)." | 1132 | obtain a list of these variables. You will also have to call |
| 1133 | `mh-set-cmd-note' if your notations are not in column 4 (columns in | ||
| 1134 | Emacs start with 0)." | ||
| 1068 | :type '(choice (const :tag "Use MH-E scan Format" t) | 1135 | :type '(choice (const :tag "Use MH-E scan Format" t) |
| 1069 | (const :tag "Use Default scan Format" nil) | 1136 | (const :tag "Use Default scan Format" nil) |
| 1070 | (file :tag "Specify a scan Format File")) | 1137 | (file :tag "Specify a scan Format File")) |
| @@ -1073,10 +1140,12 @@ not in column 4 (columns in Emacs start with 0)." | |||
| 1073 | 1140 | ||
| 1074 | (defcustom mh-scan-prog "scan" | 1141 | (defcustom mh-scan-prog "scan" |
| 1075 | "*Program used to scan messages. | 1142 | "*Program used to scan messages. |
| 1076 | The name of the program that generates a listing of one line per message is | 1143 | |
| 1077 | held in this option. Unless this variable contains an absolute pathname, it is | 1144 | The name of the program that generates a listing of one line per |
| 1078 | assumed to be in the `mh-progs' directory. You may link another program to | 1145 | message is held in this option. Unless this variable contains an |
| 1079 | `scan' (see \"mh-profile(5)\") to produce a different type of listing." | 1146 | absolute pathname, it is assumed to be in the `mh-progs' |
| 1147 | directory. You may link another program to `scan' (see | ||
| 1148 | \"mh-profile(5)\") to produce a different type of listing." | ||
| 1080 | :type 'string | 1149 | :type 'string |
| 1081 | :group 'mh-scan-line-formats) | 1150 | :group 'mh-scan-line-formats) |
| 1082 | (make-variable-buffer-local 'mh-scan-prog) | 1151 | (make-variable-buffer-local 'mh-scan-prog) |
| @@ -1088,24 +1157,26 @@ assumed to be in the `mh-progs' directory. You may link another program to | |||
| 1088 | (defcustom mh-compose-forward-as-mime-flag t | 1157 | (defcustom mh-compose-forward-as-mime-flag t |
| 1089 | "*Non-nil means that messages are forwarded as attachments. | 1158 | "*Non-nil means that messages are forwarded as attachments. |
| 1090 | 1159 | ||
| 1091 | By default, this option is on which means that the forwarded messages are | 1160 | By default, this option is on which means that the forwarded |
| 1092 | included as attachments. If you would prefer to forward your messages verbatim | 1161 | messages are included as attachments. If you would prefer to |
| 1093 | \(as text, inline), then turn off this option. Forwarding messages verbatim | 1162 | forward your messages verbatim (as text, inline), then turn off |
| 1094 | works well for short, textual messages, but your recipient won't be able to | 1163 | this option. Forwarding messages verbatim works well for short, |
| 1095 | view any non-textual attachments that were in the forwarded message. Be aware | 1164 | textual messages, but your recipient won't be able to view any |
| 1096 | that if you have \"forw: -mime\" in your MH profile, then forwarded messages | 1165 | non-textual attachments that were in the forwarded message. Be |
| 1097 | will always be included as attachments regardless of the settings of this | 1166 | aware that if you have \"forw: -mime\" in your MH profile, then |
| 1098 | option." | 1167 | forwarded messages will always be included as attachments |
| 1168 | regardless of the settings of this option." | ||
| 1099 | :type 'boolean | 1169 | :type 'boolean |
| 1100 | :group 'mh-sending-mail) | 1170 | :group 'mh-sending-mail) |
| 1101 | 1171 | ||
| 1102 | (defcustom mh-compose-letter-function nil | 1172 | (defcustom mh-compose-letter-function nil |
| 1103 | "Invoked when starting a new draft. | 1173 | "Invoked when starting a new draft. |
| 1104 | 1174 | ||
| 1105 | However, it is the last function called before you edit your message. The | 1175 | However, it is the last function called before you edit your |
| 1106 | consequence of this is that you can write a function to write and send the | 1176 | message. The consequence of this is that you can write a function |
| 1107 | message for you. This function is passed three arguments: the contents of the | 1177 | to write and send the message for you. This function is passed |
| 1108 | TO, SUBJECT, and CC header fields." | 1178 | three arguments: the contents of the TO, SUBJECT, and CC header |
| 1179 | fields." | ||
| 1109 | :type '(choice (const nil) function) | 1180 | :type '(choice (const nil) function) |
| 1110 | :group 'mh-sending-mail) | 1181 | :group 'mh-sending-mail) |
| 1111 | 1182 | ||
| @@ -1117,40 +1188,40 @@ TO, SUBJECT, and CC header fields." | |||
| 1117 | (defcustom mh-forward-subject-format "%s: %s" | 1188 | (defcustom mh-forward-subject-format "%s: %s" |
| 1118 | "*Format string for forwarded message subject. | 1189 | "*Format string for forwarded message subject. |
| 1119 | 1190 | ||
| 1120 | This option is a string which includes two escapes (\"%s\"). The first \"%s\" | 1191 | This option is a string which includes two escapes (\"%s\"). The |
| 1121 | is replaced with the sender of the original message, and the second one is | 1192 | first \"%s\" is replaced with the sender of the original message, |
| 1122 | replaced with the original \"Subject:\"." | 1193 | and the second one is replaced with the original \"Subject:\"." |
| 1123 | :type 'string | 1194 | :type 'string |
| 1124 | :group 'mh-sending-mail) | 1195 | :group 'mh-sending-mail) |
| 1125 | 1196 | ||
| 1126 | (defcustom mh-insert-x-mailer-flag t | 1197 | (defcustom mh-insert-x-mailer-flag t |
| 1127 | "*Non-nil means append an \"X-Mailer:\" header field to the header. | 1198 | "*Non-nil means append an \"X-Mailer:\" header field to the header. |
| 1128 | 1199 | ||
| 1129 | This header field includes the version of MH-E and Emacs that you are using. | 1200 | This header field includes the version of MH-E and Emacs that you |
| 1130 | If you don't want to participate in our marketing, you can turn this option | 1201 | are using. If you don't want to participate in our marketing, you |
| 1131 | off." | 1202 | can turn this option off." |
| 1132 | :type 'boolean | 1203 | :type 'boolean |
| 1133 | :group 'mh-sending-mail) | 1204 | :group 'mh-sending-mail) |
| 1134 | 1205 | ||
| 1135 | (defcustom mh-redist-full-contents-flag nil | 1206 | (defcustom mh-redist-full-contents-flag nil |
| 1136 | "*Non-nil means the \"dist\" command needs entire letter for redistribution. | 1207 | "*Non-nil means the \"dist\" command needs entire letter for redistribution. |
| 1137 | 1208 | ||
| 1138 | This option must be turned on if \"dist\" requires the whole letter for | 1209 | This option must be turned on if \"dist\" requires the whole |
| 1139 | redistribution, which is the case if \"send\" is compiled with the BERK option | 1210 | letter for redistribution, which is the case if \"send\" is |
| 1140 | \(which many people abhor). If you find that MH will not allow you to | 1211 | compiled with the BERK option (which many people abhor). If you |
| 1141 | redistribute a message that has been redistributed before, turn off this | 1212 | find that MH will not allow you to redistribute a message that |
| 1142 | option." | 1213 | has been redistributed before, turn off this option." |
| 1143 | :type 'boolean | 1214 | :type 'boolean |
| 1144 | :group 'mh-sending-mail) | 1215 | :group 'mh-sending-mail) |
| 1145 | 1216 | ||
| 1146 | (defcustom mh-reply-default-reply-to nil | 1217 | (defcustom mh-reply-default-reply-to nil |
| 1147 | "*Sets the person or persons to whom a reply will be sent. | 1218 | "*Sets the person or persons to whom a reply will be sent. |
| 1148 | 1219 | ||
| 1149 | This option is set to \"Prompt\" by default so that you are prompted for the | 1220 | This option is set to \"Prompt\" by default so that you are |
| 1150 | recipient of a reply. If you find that most of the time that you specify | 1221 | prompted for the recipient of a reply. If you find that most of |
| 1151 | \"cc\" when you reply to a message, set this option to \"cc\". Other choices | 1222 | the time that you specify \"cc\" when you reply to a message, set |
| 1152 | include \"from\", \"to\", or \"all\". You can always edit the recipients in | 1223 | this option to \"cc\". Other choices include \"from\", \"to\", or |
| 1153 | the draft." | 1224 | \"all\". You can always edit the recipients in the draft." |
| 1154 | :type '(choice (const :tag "Prompt" nil) | 1225 | :type '(choice (const :tag "Prompt" nil) |
| 1155 | (const "from") | 1226 | (const "from") |
| 1156 | (const "to") | 1227 | (const "to") |
| @@ -1161,8 +1232,8 @@ the draft." | |||
| 1161 | (defcustom mh-reply-show-message-flag t | 1232 | (defcustom mh-reply-show-message-flag t |
| 1162 | "*Non-nil means the MH-Show buffer is displayed when replying. | 1233 | "*Non-nil means the MH-Show buffer is displayed when replying. |
| 1163 | 1234 | ||
| 1164 | If you include the message automatically, you can hide the MH-Show | 1235 | If you include the message automatically, you can hide the |
| 1165 | buffer by turning off this option. | 1236 | MH-Show buffer by turning off this option. |
| 1166 | 1237 | ||
| 1167 | See also `mh-reply'." | 1238 | See also `mh-reply'." |
| 1168 | :type 'boolean | 1239 | :type 'boolean |
| @@ -1179,19 +1250,20 @@ See also `mh-reply'." | |||
| 1179 | (defcustom mh-refile-preserves-sequences-flag t | 1250 | (defcustom mh-refile-preserves-sequences-flag t |
| 1180 | "*Non-nil means that sequences are preserved when messages are refiled. | 1251 | "*Non-nil means that sequences are preserved when messages are refiled. |
| 1181 | 1252 | ||
| 1182 | If a message is in any sequence (except \"Previous-Sequence:\" and \"cur\") | 1253 | If a message is in any sequence (except \"Previous-Sequence:\" |
| 1183 | when it is refiled, then it will still be in those sequences in the | 1254 | and \"cur\") when it is refiled, then it will still be in those |
| 1184 | destination folder. If this behavior is not desired, then turn off this | 1255 | sequences in the destination folder. If this behavior is not |
| 1185 | option." | 1256 | desired, then turn off this option." |
| 1186 | :type 'boolean | 1257 | :type 'boolean |
| 1187 | :group 'mh-sequences) | 1258 | :group 'mh-sequences) |
| 1188 | 1259 | ||
| 1189 | (defcustom mh-tick-seq 'tick | 1260 | (defcustom mh-tick-seq 'tick |
| 1190 | "The name of the MH sequence for ticked messages. | 1261 | "The name of the MH sequence for ticked messages. |
| 1191 | 1262 | ||
| 1192 | You can customize this option if you already use the \"tick\" sequence for | 1263 | You can customize this option if you already use the \"tick\" |
| 1193 | your own use. You can also disable all of the ticking functions by choosing | 1264 | sequence for your own use. You can also disable all of the |
| 1194 | the \"Disable Ticking\" item but there isn't much advantage to that." | 1265 | ticking functions by choosing the \"Disable Ticking\" item but |
| 1266 | there isn't much advantage to that." | ||
| 1195 | :type '(choice (const :tag "Disable Ticking" nil) | 1267 | :type '(choice (const :tag "Disable Ticking" nil) |
| 1196 | symbol) | 1268 | symbol) |
| 1197 | :group 'mh-sequences) | 1269 | :group 'mh-sequences) |
| @@ -1199,13 +1271,14 @@ the \"Disable Ticking\" item but there isn't much advantage to that." | |||
| 1199 | (defcustom mh-update-sequences-after-mh-show-flag t | 1271 | (defcustom mh-update-sequences-after-mh-show-flag t |
| 1200 | "*Non-nil means flush MH sequences to disk after message is shown. | 1272 | "*Non-nil means flush MH sequences to disk after message is shown. |
| 1201 | 1273 | ||
| 1202 | Three sequences are maintained internally by MH-E and pushed out to MH when a | 1274 | Three sequences are maintained internally by MH-E and pushed out |
| 1203 | message is shown. They include the sequence specified by your | 1275 | to MH when a message is shown. They include the sequence |
| 1204 | \"Unseen-Sequence:\" profile entry, \"cur\", and the sequence listed by the | 1276 | specified by your \"Unseen-Sequence:\" profile entry, \"cur\", |
| 1205 | option `mh-tick-seq' which is \"tick\" by default. If you do not like this | 1277 | and the sequence listed by the option `mh-tick-seq' which is |
| 1206 | behavior, turn off this option. You can then update the state manually with | 1278 | \"tick\" by default. If you do not like this behavior, turn off |
| 1207 | the `\\[mh-execute-commands]', `\\[mh-quit]', or `\\[mh-update-sequences]' | 1279 | this option. You can then update the state manually with the |
| 1208 | commands." | 1280 | `\\[mh-execute-commands]', `\\[mh-quit]', or |
| 1281 | `\\[mh-update-sequences]' commands." | ||
| 1209 | :type 'boolean | 1282 | :type 'boolean |
| 1210 | :group 'mh-sequences) | 1283 | :group 'mh-sequences) |
| 1211 | 1284 | ||
| @@ -1216,10 +1289,10 @@ commands." | |||
| 1216 | (defcustom mh-bury-show-buffer-flag t | 1289 | (defcustom mh-bury-show-buffer-flag t |
| 1217 | "*Non-nil means show buffer is buried. | 1290 | "*Non-nil means show buffer is buried. |
| 1218 | 1291 | ||
| 1219 | One advantage of not burying the show buffer is that one can delete the show | 1292 | One advantage of not burying the show buffer is that one can |
| 1220 | buffer more easily in an electric buffer list because of its proximity to its | 1293 | delete the show buffer more easily in an electric buffer list |
| 1221 | associated MH-Folder buffer. Try running \\[electric-buffer-list] to see what | 1294 | because of its proximity to its associated MH-Folder buffer. Try |
| 1222 | I mean." | 1295 | running \\[electric-buffer-list] to see what I mean." |
| 1223 | :type 'boolean | 1296 | :type 'boolean |
| 1224 | :group 'mh-show) | 1297 | :group 'mh-show) |
| 1225 | 1298 | ||
| @@ -1234,45 +1307,47 @@ See also `mh-invisible-header-fields-default' and | |||
| 1234 | (defcustom mh-decode-mime-flag (not (not (locate-library "mm-decode"))) | 1307 | (defcustom mh-decode-mime-flag (not (not (locate-library "mm-decode"))) |
| 1235 | "*Non-nil means attachments are handled\\<mh-folder-mode-map>. | 1308 | "*Non-nil means attachments are handled\\<mh-folder-mode-map>. |
| 1236 | 1309 | ||
| 1237 | MH-E can handle attachments as well if the Gnus `mm-decode' library is | 1310 | MH-E can handle attachments as well if the Gnus `mm-decode' |
| 1238 | present. If so, this option will be on. Otherwise, you'll see the MIME body | 1311 | library is present. If so, this option will be on. Otherwise, |
| 1239 | parts rather than text or attachments. There isn't much point in turning off | 1312 | you'll see the MIME body parts rather than text or attachments. |
| 1240 | this option; however, you can inspect it if it appears that the body parts are | 1313 | There isn't much point in turning off this option; however, you |
| 1241 | not being interpreted correctly or toggle it with the command | 1314 | can inspect it if it appears that the body parts are not being |
| 1315 | interpreted correctly or toggle it with the command | ||
| 1242 | \\[mh-toggle-mh-decode-mime-flag] to view the raw message. | 1316 | \\[mh-toggle-mh-decode-mime-flag] to view the raw message. |
| 1243 | 1317 | ||
| 1244 | This option also controls the display of quoted-printable messages and other | 1318 | This option also controls the display of quoted-printable |
| 1245 | graphical widgets. See the options `mh-graphical-smileys-flag' and | 1319 | messages and other graphical widgets. See the options |
| 1246 | `mh-graphical-emphasis-flag'." | 1320 | `mh-graphical-smileys-flag' and `mh-graphical-emphasis-flag'." |
| 1247 | :type 'boolean | 1321 | :type 'boolean |
| 1248 | :group 'mh-show) | 1322 | :group 'mh-show) |
| 1249 | 1323 | ||
| 1250 | (defcustom mh-display-buttons-for-alternatives-flag nil | 1324 | (defcustom mh-display-buttons-for-alternatives-flag nil |
| 1251 | "*Non-nil means display buttons for all alternative attachments. | 1325 | "*Non-nil means display buttons for all alternative attachments. |
| 1252 | 1326 | ||
| 1253 | Sometimes, a mail program will produce multiple alternatives of the attachment | 1327 | Sometimes, a mail program will produce multiple alternatives of |
| 1254 | in increasing degree of faithfulness to the original content. By default, only | 1328 | the attachment in increasing degree of faithfulness to the |
| 1255 | the preferred alternative is displayed. If this option is on, then the | 1329 | original content. By default, only the preferred alternative is |
| 1256 | preferred part is shown inline and buttons are shown for each of the other | 1330 | displayed. If this option is on, then the preferred part is shown |
| 1257 | alternatives." | 1331 | inline and buttons are shown for each of the other alternatives." |
| 1258 | :type 'boolean | 1332 | :type 'boolean |
| 1259 | :group 'mh-show) | 1333 | :group 'mh-show) |
| 1260 | 1334 | ||
| 1261 | (defcustom mh-display-buttons-for-inline-parts-flag nil | 1335 | (defcustom mh-display-buttons-for-inline-parts-flag nil |
| 1262 | "*Non-nil means display buttons for all inline attachments\\<mh-folder-mode-map>. | 1336 | "*Non-nil means display buttons for all inline attachments\\<mh-folder-mode-map>. |
| 1263 | 1337 | ||
| 1264 | The sender can request that attachments should be viewed inline so that they | 1338 | The sender can request that attachments should be viewed inline so |
| 1265 | do not really appear like an attachment at all to the reader. Most of the | 1339 | that they do not really appear like an attachment at all to the |
| 1266 | time, this is desirable, so by default MH-E suppresses the buttons for inline | 1340 | reader. Most of the time, this is desirable, so by default MH-E |
| 1267 | attachments. On the other hand, you may receive code or HTML which the sender | 1341 | suppresses the buttons for inline attachments. On the other hand, you |
| 1268 | has added to his message as inline attachments so that you can read them in | 1342 | may receive code or HTML which the sender has added to his message as |
| 1269 | MH-E. In this case, it is useful to see the buttons so that you know you don't | 1343 | inline attachments so that you can read them in MH-E. In this case, it |
| 1270 | have to cut and paste the code into a file; you can simply save the | 1344 | is useful to see the buttons so that you know you don't have to cut |
| 1271 | attachment. | 1345 | and paste the code into a file; you can simply save the attachment. |
| 1272 | 1346 | ||
| 1273 | If you want to make the buttons visible for inline attachments, you can use | 1347 | If you want to make the buttons visible for inline attachments, you |
| 1274 | the command \\[mh-toggle-mime-buttons] to toggle the visibility of these | 1348 | can use the command \\[mh-toggle-mime-buttons] to toggle the |
| 1275 | buttons. You can turn on these buttons permanently by turning on this option. | 1349 | visibility of these buttons. You can turn on these buttons permanently |
| 1350 | by turning on this option. | ||
| 1276 | 1351 | ||
| 1277 | MH-E cannot display all attachments inline however. It can display | 1352 | MH-E cannot display all attachments inline however. It can display |
| 1278 | text (including HTML) and images." | 1353 | text (including HTML) and images." |
| @@ -1282,42 +1357,44 @@ text (including HTML) and images." | |||
| 1282 | (defcustom mh-do-not-confirm-flag nil | 1357 | (defcustom mh-do-not-confirm-flag nil |
| 1283 | "*Non-nil means non-reversible commands do not prompt for confirmation. | 1358 | "*Non-nil means non-reversible commands do not prompt for confirmation. |
| 1284 | 1359 | ||
| 1285 | Commands such as `mh-pack-folder' prompt to confirm whether to process | 1360 | Commands such as `mh-pack-folder' prompt to confirm whether to |
| 1286 | outstanding moves and deletes or not before continuing. Turning on this option | 1361 | process outstanding moves and deletes or not before continuing. |
| 1287 | means that these actions will be performed--which is usually desired but | 1362 | Turning on this option means that these actions will be |
| 1288 | cannot be retracted--without question." | 1363 | performed--which is usually desired but cannot be |
| 1364 | retracted--without question." | ||
| 1289 | :type 'boolean | 1365 | :type 'boolean |
| 1290 | :group 'mh-show) | 1366 | :group 'mh-show) |
| 1291 | 1367 | ||
| 1292 | (defcustom mh-fetch-x-image-url nil | 1368 | (defcustom mh-fetch-x-image-url nil |
| 1293 | "*Control fetching of \"X-Image-URL:\" header field image. | 1369 | "*Control fetching of \"X-Image-URL:\" header field image. |
| 1294 | 1370 | ||
| 1295 | Ths option controls the fetching of the \"X-Image-URL:\" header field image | 1371 | Ths option controls the fetching of the \"X-Image-URL:\" header |
| 1296 | with the following values: | 1372 | field image with the following values: |
| 1297 | 1373 | ||
| 1298 | Ask Before Fetching | 1374 | Ask Before Fetching |
| 1299 | You are prompted before the image is fetched. MH-E will remember | 1375 | You are prompted before the image is fetched. MH-E will |
| 1300 | your reply and will either use the already fetched image the next | 1376 | remember your reply and will either use the already fetched |
| 1301 | time the same URL is encountered or silently skip it if you didn't | 1377 | image the next time the same URL is encountered or silently |
| 1302 | fetch it the first time. This is a good setting. | 1378 | skip it if you didn't fetch it the first time. This is a |
| 1379 | good setting. | ||
| 1303 | 1380 | ||
| 1304 | Never Fetch | 1381 | Never Fetch |
| 1305 | Images are never fetched and only displayed if they are already | 1382 | Images are never fetched and only displayed if they are |
| 1306 | present in the cache. This is the default. | 1383 | already present in the cache. This is the default. |
| 1307 | 1384 | ||
| 1308 | There isn't a value of \"Always Fetch\" for privacy and DOS (denial of | 1385 | There isn't a value of \"Always Fetch\" for privacy and DOS (denial of |
| 1309 | service) reasons. For example, fetching a URL can tip off a spammer that | 1386 | service) reasons. For example, fetching a URL can tip off a spammer |
| 1310 | you've read his email (which is why you shouldn't blindly answer yes if you've | 1387 | that you've read his email (which is why you shouldn't blindly answer |
| 1311 | set this option to \"Ask Before Fetching\"). Someone may also flood your | 1388 | yes if you've set this option to \"Ask Before Fetching\"). Someone may |
| 1312 | network and fill your disk drive by sending a torrent of messages, each | 1389 | also flood your network and fill your disk drive by sending a torrent |
| 1313 | specifying a unique URL to a very large file. | 1390 | of messages, each specifying a unique URL to a very large file. |
| 1314 | 1391 | ||
| 1315 | The cache of images is found in the directory \".mhe-x-image-cache\" within | 1392 | The cache of images is found in the directory \".mhe-x-image-cache\" |
| 1316 | your MH directory. You can add your own face to the \"From:\" field too. See | 1393 | within your MH directory. You can add your own face to the \"From:\" |
| 1317 | Info node `(mh-e)Picture'. | 1394 | field too. See Info node `(mh-e)Picture'. |
| 1318 | 1395 | ||
| 1319 | This setting only has effect if the option `mh-show-use-xface-flag' is turned | 1396 | This setting only has effect if the option `mh-show-use-xface-flag' is |
| 1320 | on." | 1397 | turned on." |
| 1321 | 1398 | ||
| 1322 | :type '(choice (const :tag "Ask Before Fetching" ask) | 1399 | :type '(choice (const :tag "Ask Before Fetching" ask) |
| 1323 | (const :tag "Never Fetch" nil)) | 1400 | (const :tag "Never Fetch" nil)) |
| @@ -1326,37 +1403,42 @@ on." | |||
| 1326 | (defcustom mh-graphical-smileys-flag t | 1403 | (defcustom mh-graphical-smileys-flag t |
| 1327 | "*Non-nil means graphical smileys are displayed. | 1404 | "*Non-nil means graphical smileys are displayed. |
| 1328 | 1405 | ||
| 1329 | It is a long standing custom to inject body language using a cornucopia of | 1406 | It is a long standing custom to inject body language using a |
| 1330 | punctuation, also known as the \"smileys\". MH-E can render these as graphical | 1407 | cornucopia of punctuation, also known as the \"smileys\". MH-E |
| 1331 | widgets if this option is turned on, which it is by default. Smileys include | 1408 | can render these as graphical widgets if this option is turned |
| 1332 | patterns such as :-) and ;-). | 1409 | on, which it is by default. Smileys include patterns such as :-) |
| 1410 | and ;-). | ||
| 1333 | 1411 | ||
| 1334 | This option is disabled if the option `mh-decode-mime-flag' is turned off." | 1412 | This option is disabled if the option `mh-decode-mime-flag' is |
| 1413 | turned off." | ||
| 1335 | :type 'boolean | 1414 | :type 'boolean |
| 1336 | :group 'mh-show) | 1415 | :group 'mh-show) |
| 1337 | 1416 | ||
| 1338 | (defcustom mh-graphical-emphasis-flag t | 1417 | (defcustom mh-graphical-emphasis-flag t |
| 1339 | "*Non-nil means graphical emphasis is displayed. | 1418 | "*Non-nil means graphical emphasis is displayed. |
| 1340 | 1419 | ||
| 1341 | A few typesetting features are indicated in ASCII text with certain | 1420 | A few typesetting features are indicated in ASCII text with |
| 1342 | characters. If your terminal supports it, MH-E can render these typesetting | 1421 | certain characters. If your terminal supports it, MH-E can render |
| 1343 | directives naturally if this option is turned on, which it is by default. For | 1422 | these typesetting directives naturally if this option is turned |
| 1344 | example, _underline_ will be underlined, *bold* will appear in bold, /italics/ | 1423 | on, which it is by default. For example, _underline_ will be |
| 1345 | will appear in italics, and so on. See the option `gnus-emphasis-alist' for | 1424 | underlined, *bold* will appear in bold, /italics/ will appear in |
| 1346 | the whole list. | 1425 | italics, and so on. See the option `gnus-emphasis-alist' for the |
| 1426 | whole list. | ||
| 1347 | 1427 | ||
| 1348 | This option is disabled if the option `mh-decode-mime-flag' is turned off." | 1428 | This option is disabled if the option `mh-decode-mime-flag' is |
| 1429 | turned off." | ||
| 1349 | :type 'boolean | 1430 | :type 'boolean |
| 1350 | :group 'mh-show) | 1431 | :group 'mh-show) |
| 1351 | 1432 | ||
| 1352 | (defcustom mh-highlight-citation-style 'gnus | 1433 | (defcustom mh-highlight-citation-style 'gnus |
| 1353 | "Style for highlighting citations. | 1434 | "Style for highlighting citations. |
| 1354 | 1435 | ||
| 1355 | If the sender of the message has cited other messages in his message, then | 1436 | If the sender of the message has cited other messages in his |
| 1356 | MH-E will highlight these citations to emphasize the sender's actual response. | 1437 | message, then MH-E will highlight these citations to emphasize |
| 1357 | This option can be customized to change the highlighting style. The | 1438 | the sender's actual response. This option can be customized to |
| 1358 | \"Multicolor\" method uses a different color for each indentation while the | 1439 | change the highlighting style. The \"Multicolor\" method uses a |
| 1359 | \"Monochrome\" method highlights all citations in red. To disable highlighting | 1440 | different color for each indentation while the \"Monochrome\" |
| 1441 | method highlights all citations in red. To disable highlighting | ||
| 1360 | of citations entirely, choose \"None\"." | 1442 | of citations entirely, choose \"None\"." |
| 1361 | :type '(choice (const :tag "Multicolor" gnus) | 1443 | :type '(choice (const :tag "Multicolor" gnus) |
| 1362 | (const :tag "Monochrome" font-lock) | 1444 | (const :tag "Monochrome" font-lock) |
| @@ -1538,9 +1620,11 @@ of citations entirely, choose \"None\"." | |||
| 1538 | "X400-" ; X400 | 1620 | "X400-" ; X400 |
| 1539 | "Xref:") | 1621 | "Xref:") |
| 1540 | "List of default header fields that are not to be shown. | 1622 | "List of default header fields that are not to be shown. |
| 1541 | Do not alter this variable directly. Instead, add entries from here that you | 1623 | |
| 1542 | would like to be displayed in `mh-invisible-header-fields-default' | 1624 | Do not alter this variable directly. Instead, add entries from |
| 1543 | and add entries to hide in `mh-invisible-header-fields'.") | 1625 | here that you would like to be displayed in |
| 1626 | `mh-invisible-header-fields-default' and add entries to hide in | ||
| 1627 | `mh-invisible-header-fields'.") | ||
| 1544 | 1628 | ||
| 1545 | (defvar mh-invisible-header-fields-compiled nil | 1629 | (defvar mh-invisible-header-fields-compiled nil |
| 1546 | "*Regexp matching lines in a message header that are not to be shown. | 1630 | "*Regexp matching lines in a message header that are not to be shown. |
| @@ -1551,9 +1635,9 @@ hidden that you wish to display, and add extra entries to hide in | |||
| 1551 | 1635 | ||
| 1552 | (defun mh-invisible-headers () | 1636 | (defun mh-invisible-headers () |
| 1553 | "Make or remake the variable `mh-invisible-header-fields-compiled'. | 1637 | "Make or remake the variable `mh-invisible-header-fields-compiled'. |
| 1554 | Done using `mh-invisible-header-fields-internal' as input, from which entries | 1638 | Done using `mh-invisible-header-fields-internal' as input, from |
| 1555 | from `mh-invisible-header-fields-default' are removed and entries | 1639 | which entries from `mh-invisible-header-fields-default' are |
| 1556 | from `mh-invisible-header-fields' are added." | 1640 | removed and entries from `mh-invisible-header-fields' are added." |
| 1557 | (let ((fields mh-invisible-header-fields-internal)) | 1641 | (let ((fields mh-invisible-header-fields-internal)) |
| 1558 | (when mh-invisible-header-fields-default | 1642 | (when mh-invisible-header-fields-default |
| 1559 | ;; Remove entries from `mh-invisible-header-fields-default' | 1643 | ;; Remove entries from `mh-invisible-header-fields-default' |
| @@ -1577,11 +1661,11 @@ from `mh-invisible-header-fields' are added." | |||
| 1577 | (defcustom mh-invisible-header-fields-default nil | 1661 | (defcustom mh-invisible-header-fields-default nil |
| 1578 | "*List of hidden header fields. | 1662 | "*List of hidden header fields. |
| 1579 | 1663 | ||
| 1580 | The header fields listed in this option are hidden, although you can check off | 1664 | The header fields listed in this option are hidden, although you |
| 1581 | any field that you would like to see. | 1665 | can check off any field that you would like to see. |
| 1582 | 1666 | ||
| 1583 | Header fields that you would like to hide that aren't listed can be added to | 1667 | Header fields that you would like to hide that aren't listed can |
| 1584 | the option `mh-invisible-header-fields'. | 1668 | be added to the option `mh-invisible-header-fields'. |
| 1585 | 1669 | ||
| 1586 | See also `mh-clean-message-header-flag'." | 1670 | See also `mh-clean-message-header-flag'." |
| 1587 | :type `(set ,@(mapcar (lambda (x) `(const ,x)) | 1671 | :type `(set ,@(mapcar (lambda (x) `(const ,x)) |
| @@ -1595,11 +1679,12 @@ See also `mh-clean-message-header-flag'." | |||
| 1595 | "*Additional header fields to hide. | 1679 | "*Additional header fields to hide. |
| 1596 | 1680 | ||
| 1597 | Header fields that you would like to hide that aren't listed in | 1681 | Header fields that you would like to hide that aren't listed in |
| 1598 | `mh-invisible-header-fields-default' can be added to this option with a couple | 1682 | `mh-invisible-header-fields-default' can be added to this option |
| 1599 | of caveats. Regular expressions are not allowed. Unique fields should have a | 1683 | with a couple of caveats. Regular expressions are not allowed. |
| 1600 | `:' suffix; otherwise, the element can be used to render invisible an entire | 1684 | Unique fields should have a `:' suffix; otherwise, the element |
| 1601 | class of fields that start with the same prefix. If you think a header field | 1685 | can be used to render invisible an entire class of fields that |
| 1602 | should be generally ignored, report a bug (see URL | 1686 | start with the same prefix. If you think a header field should be |
| 1687 | generally ignored, report a bug (see URL | ||
| 1603 | `https://sourceforge.net/tracker/?group_id=13357&atid=113357'). | 1688 | `https://sourceforge.net/tracker/?group_id=13357&atid=113357'). |
| 1604 | 1689 | ||
| 1605 | See also `mh-clean-message-header-flag'." | 1690 | See also `mh-clean-message-header-flag'." |
| @@ -1613,12 +1698,13 @@ See also `mh-clean-message-header-flag'." | |||
| 1613 | (defcustom mh-lpr-command-format "lpr -J '%s'" | 1698 | (defcustom mh-lpr-command-format "lpr -J '%s'" |
| 1614 | "*Command used to print\\<mh-folder-mode-map>. | 1699 | "*Command used to print\\<mh-folder-mode-map>. |
| 1615 | 1700 | ||
| 1616 | This option contains the Unix command line which performs the actual printing | 1701 | This option contains the Unix command line which performs the |
| 1617 | for the \\[mh-print-msg] command. The string can contain one escape, \"%s\", | 1702 | actual printing for the \\[mh-print-msg] command. The string can |
| 1618 | which is replaced by the name of the folder and the message number and is | 1703 | contain one escape, \"%s\", which is replaced by the name of the |
| 1619 | useful for print job names. I use \"mpage -h'%s' -b Letter -H1of -mlrtb -P\" | 1704 | folder and the message number and is useful for print job names. |
| 1620 | which produces a nice header and adds a bit of margin so the text fits within | 1705 | I use \"mpage -h'%s' -b Letter -H1of -mlrtb -P\" which produces a |
| 1621 | my printer's margins. | 1706 | nice header and adds a bit of margin so the text fits within my |
| 1707 | printer's margins. | ||
| 1622 | 1708 | ||
| 1623 | This options is not used by the commands \\[mh-ps-print-msg] or | 1709 | This options is not used by the commands \\[mh-ps-print-msg] or |
| 1624 | \\[mh-ps-print-msg-file]." | 1710 | \\[mh-ps-print-msg-file]." |
| @@ -1628,48 +1714,51 @@ This options is not used by the commands \\[mh-ps-print-msg] or | |||
| 1628 | (defcustom mh-max-inline-image-height nil | 1714 | (defcustom mh-max-inline-image-height nil |
| 1629 | "*Maximum inline image height if \"Content-Disposition:\" is not present. | 1715 | "*Maximum inline image height if \"Content-Disposition:\" is not present. |
| 1630 | 1716 | ||
| 1631 | Some older mail programs do not insert this needed plumbing to tell | 1717 | Some older mail programs do not insert this needed plumbing to |
| 1632 | MH-E whether to display the attachments inline or not. If this is the | 1718 | tell MH-E whether to display the attachments inline or not. If |
| 1633 | case, MH-E will display these images inline if they are smaller than | 1719 | this is the case, MH-E will display these images inline if they |
| 1634 | the window. However, you might want to allow larger images to be | 1720 | are smaller than the window. However, you might want to allow |
| 1635 | displayed inline. To do this, you can change the options | 1721 | larger images to be displayed inline. To do this, you can change |
| 1636 | `mh-max-inline-image-width' and `mh-max-inline-image-height' from their | 1722 | the options `mh-max-inline-image-width' and |
| 1637 | default value of zero to a large number. The size of your screen is a | 1723 | `mh-max-inline-image-height' from their default value of zero to |
| 1638 | good choice for these numbers." | 1724 | a large number. The size of your screen is a good choice for |
| 1725 | these numbers." | ||
| 1639 | :type '(choice (const nil) integer) | 1726 | :type '(choice (const nil) integer) |
| 1640 | :group 'mh-show) | 1727 | :group 'mh-show) |
| 1641 | 1728 | ||
| 1642 | (defcustom mh-max-inline-image-width nil | 1729 | (defcustom mh-max-inline-image-width nil |
| 1643 | "*Maximum inline image width if \"Content-Disposition:\" is not present. | 1730 | "*Maximum inline image width if \"Content-Disposition:\" is not present. |
| 1644 | 1731 | ||
| 1645 | Some older mail programs do not insert this needed plumbing to tell | 1732 | Some older mail programs do not insert this needed plumbing to |
| 1646 | MH-E whether to display the attachments inline or not. If this is the | 1733 | tell MH-E whether to display the attachments inline or not. If |
| 1647 | case, MH-E will display these images inline if they are smaller than | 1734 | this is the case, MH-E will display these images inline if they |
| 1648 | the window. However, you might want to allow larger images to be | 1735 | are smaller than the window. However, you might want to allow |
| 1649 | displayed inline. To do this, you can change the options | 1736 | larger images to be displayed inline. To do this, you can change |
| 1650 | `mh-max-inline-image-width' and `mh-max-inline-image-height' from their | 1737 | the options `mh-max-inline-image-width' and |
| 1651 | default value of zero to a large number. The size of your screen is a | 1738 | `mh-max-inline-image-height' from their default value of zero to |
| 1652 | good choice for these numbers." | 1739 | a large number. The size of your screen is a good choice for |
| 1740 | these numbers." | ||
| 1653 | :type '(choice (const nil) integer) | 1741 | :type '(choice (const nil) integer) |
| 1654 | :group 'mh-show) | 1742 | :group 'mh-show) |
| 1655 | 1743 | ||
| 1656 | (defcustom mh-mhl-format-file nil | 1744 | (defcustom mh-mhl-format-file nil |
| 1657 | "*Specifies the format file to pass to the \"mhl\" program. | 1745 | "*Specifies the format file to pass to the \"mhl\" program. |
| 1658 | 1746 | ||
| 1659 | Normally MH-E takes care of displaying messages itself (rather than calling an | 1747 | Normally MH-E takes care of displaying messages itself (rather than |
| 1660 | MH program to do the work). If you'd rather have \"mhl\" display the | 1748 | calling an MH program to do the work). If you'd rather have \"mhl\" |
| 1661 | message (within MH-E), change this option from its default value of \"Use | 1749 | display the message (within MH-E), change this option from its default |
| 1662 | Default mhl Format (Printing Only)\". | 1750 | value of \"Use Default mhl Format (Printing Only)\". |
| 1663 | 1751 | ||
| 1664 | You can set this option to \"Use Default mhl Format\" to get the same output | 1752 | You can set this option to \"Use Default mhl Format\" to get the same |
| 1665 | as you would get if you ran \"mhl\" from the shell. | 1753 | output as you would get if you ran \"mhl\" from the shell. |
| 1666 | 1754 | ||
| 1667 | If you have a format file that you want MH-E to use, you can set this option | 1755 | If you have a format file that you want MH-E to use, you can set this |
| 1668 | to \"Specify an mhl Format File\" and enter the name of your format file. Your | 1756 | option to \"Specify an mhl Format File\" and enter the name of your |
| 1669 | format file should specify a non-zero value for \"overflowoffset\" to allow | 1757 | format file. Your format file should specify a non-zero value for |
| 1670 | MH-E to parse the header. Note that \"mhl\" is always used for printing and | 1758 | \"overflowoffset\" to allow MH-E to parse the header. Note that |
| 1671 | forwarding; in this case, the value of this option is consulted if you have | 1759 | \"mhl\" is always used for printing and forwarding; in this case, the |
| 1672 | specified a format file." | 1760 | value of this option is consulted if you have specified a format |
| 1761 | file." | ||
| 1673 | :type '(choice (const :tag "Use Default mhl Format (Printing Only)" nil) | 1762 | :type '(choice (const :tag "Use Default mhl Format (Printing Only)" nil) |
| 1674 | (const :tag "Use Default mhl Format" t) | 1763 | (const :tag "Use Default mhl Format" t) |
| 1675 | (file :tag "Specify an mhl Format File")) | 1764 | (file :tag "Specify an mhl Format File")) |
| @@ -1678,12 +1767,13 @@ specified a format file." | |||
| 1678 | (defcustom mh-mime-save-parts-default-directory t | 1767 | (defcustom mh-mime-save-parts-default-directory t |
| 1679 | "Default directory to use for \\<mh-folder-mode-map>\\[mh-mime-save-parts]. | 1768 | "Default directory to use for \\<mh-folder-mode-map>\\[mh-mime-save-parts]. |
| 1680 | 1769 | ||
| 1681 | The default value for this option is \"Prompt Always\" so that you are always | 1770 | The default value for this option is \"Prompt Always\" so that |
| 1682 | prompted for the directory in which to save the attachments. However, if you | 1771 | you are always prompted for the directory in which to save the |
| 1683 | usually use the same directory within a session, then you can set this option | 1772 | attachments. However, if you usually use the same directory |
| 1684 | to \"Prompt the First Time\" to avoid the prompt each time. you can make this | 1773 | within a session, then you can set this option to \"Prompt the |
| 1685 | directory permanent by choosing \"Directory\" and entering the directory's | 1774 | First Time\" to avoid the prompt each time. you can make this |
| 1686 | name." | 1775 | directory permanent by choosing \"Directory\" and entering the |
| 1776 | directory's name." | ||
| 1687 | :type '(choice (const :tag "Prompt the First Time" nil) | 1777 | :type '(choice (const :tag "Prompt the First Time" nil) |
| 1688 | (const :tag "Prompt Always" t) | 1778 | (const :tag "Prompt Always" t) |
| 1689 | directory) | 1779 | directory) |
| @@ -1692,11 +1782,12 @@ name." | |||
| 1692 | (defcustom mh-print-background-flag nil | 1782 | (defcustom mh-print-background-flag nil |
| 1693 | "*Non-nil means messages should be printed in the background\\<mh-folder-mode-map>. | 1783 | "*Non-nil means messages should be printed in the background\\<mh-folder-mode-map>. |
| 1694 | 1784 | ||
| 1695 | Normally messages are printed in the foreground. If this is slow on your | 1785 | Normally messages are printed in the foreground. If this is slow on |
| 1696 | system, you may elect to turn off this option to print in the background. | 1786 | your system, you may elect to turn off this option to print in the |
| 1787 | background. | ||
| 1697 | 1788 | ||
| 1698 | WARNING: If you do this, do not delete the message until it is printed or else | 1789 | WARNING: If you do this, do not delete the message until it is printed |
| 1699 | the output may be truncated. | 1790 | or else the output may be truncated. |
| 1700 | 1791 | ||
| 1701 | This option is not used by the commands \\[mh-ps-print-msg] or | 1792 | This option is not used by the commands \\[mh-ps-print-msg] or |
| 1702 | \\[mh-ps-print-msg-file]." | 1793 | \\[mh-ps-print-msg-file]." |
| @@ -1706,9 +1797,9 @@ This option is not used by the commands \\[mh-ps-print-msg] or | |||
| 1706 | (defcustom mh-show-maximum-size 0 | 1797 | (defcustom mh-show-maximum-size 0 |
| 1707 | "*Maximum size of message (in bytes) to display automatically. | 1798 | "*Maximum size of message (in bytes) to display automatically. |
| 1708 | 1799 | ||
| 1709 | This option provides an opportunity to skip over large messages which may be | 1800 | This option provides an opportunity to skip over large messages |
| 1710 | slow to load. The default value of 0 means that all message are shown | 1801 | which may be slow to load. The default value of 0 means that all |
| 1711 | regardless of size." | 1802 | message are shown regardless of size." |
| 1712 | :type 'integer | 1803 | :type 'integer |
| 1713 | :group 'mh-show) | 1804 | :group 'mh-show) |
| 1714 | 1805 | ||
| @@ -1716,12 +1807,12 @@ regardless of size." | |||
| 1716 | goto-address-highlight-p) | 1807 | goto-address-highlight-p) |
| 1717 | "*Non-nil means highlight URLs and email addresses\\<goto-address-highlight-keymap>. | 1808 | "*Non-nil means highlight URLs and email addresses\\<goto-address-highlight-keymap>. |
| 1718 | 1809 | ||
| 1719 | To send a message using the highlighted email address or to view the web page | 1810 | To send a message using the highlighted email address or to view |
| 1720 | for the highlighted URL, use the middle mouse button or | 1811 | the web page for the highlighted URL, use the middle mouse button |
| 1721 | \\[goto-address-at-point]. | 1812 | or \\[goto-address-at-point]. |
| 1722 | 1813 | ||
| 1723 | See Info node `(mh-e)Sending Mail' to see how to configure Emacs to send the | 1814 | See Info node `(mh-e)Sending Mail' to see how to configure Emacs |
| 1724 | message using MH-E. | 1815 | to send the message using MH-E. |
| 1725 | 1816 | ||
| 1726 | The default value of this option comes from the value of | 1817 | The default value of this option comes from the value of |
| 1727 | `goto-address-highlight-p'." | 1818 | `goto-address-highlight-p'." |
| @@ -1731,33 +1822,36 @@ The default value of this option comes from the value of | |||
| 1731 | (defcustom mh-show-use-xface-flag (>= emacs-major-version 21) | 1822 | (defcustom mh-show-use-xface-flag (>= emacs-major-version 21) |
| 1732 | "*Non-nil means display face images in MH-show buffers. | 1823 | "*Non-nil means display face images in MH-show buffers. |
| 1733 | 1824 | ||
| 1734 | MH-E can display the content of \"Face:\", \"X-Face:\", and \"X-Image-URL:\" | 1825 | MH-E can display the content of \"Face:\", \"X-Face:\", and |
| 1735 | header fields. If any of these fields occur in the header of your message, the | 1826 | \"X-Image-URL:\" header fields. If any of these fields occur in the |
| 1736 | sender's face will appear in the \"From:\" header field. If more than one of | 1827 | header of your message, the sender's face will appear in the \"From:\" |
| 1737 | these fields appear, then the first field found in the order \"Face:\", | 1828 | header field. If more than one of these fields appear, then the first |
| 1738 | \"X-Face:\", and \"X-Image-URL:\" will be used. | 1829 | field found in the order \"Face:\", \"X-Face:\", and \"X-Image-URL:\" |
| 1739 | 1830 | will be used. | |
| 1740 | The option `mh-show-use-xface-flag' is used to turn this feature on and off. | 1831 | |
| 1741 | This feature will be turned on by default if your system supports it. | 1832 | The option `mh-show-use-xface-flag' is used to turn this feature on |
| 1742 | 1833 | and off. This feature will be turned on by default if your system | |
| 1743 | The first header field used, if present, is the Gnus-specific \"Face:\" field. | 1834 | supports it. |
| 1744 | The \"Face:\" field appeared in GNU Emacs 21 and XEmacs. For more information, | 1835 | |
| 1745 | see URL `http://quimby.gnus.org/circus/face/'. Next is the traditional | 1836 | The first header field used, if present, is the Gnus-specific |
| 1837 | \"Face:\" field. The \"Face:\" field appeared in GNU Emacs 21 and | ||
| 1838 | XEmacs. For more information, see URL | ||
| 1839 | `http://quimby.gnus.org/circus/face/'. Next is the traditional | ||
| 1746 | \"X-Face:\" header field. The display of this field requires the | 1840 | \"X-Face:\" header field. The display of this field requires the |
| 1747 | \"uncompface\" program (see URL | 1841 | \"uncompface\" program (see URL |
| 1748 | `ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.z'). Recent versions | 1842 | `ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.z'). Recent |
| 1749 | of XEmacs have internal support for \"X-Face:\" images. If your version of | 1843 | versions of XEmacs have internal support for \"X-Face:\" images. If |
| 1750 | XEmacs does not, then you'll need both \"uncompface\" and the x-face | 1844 | your version of XEmacs does not, then you'll need both \"uncompface\" |
| 1751 | package (see URL `ftp://ftp.jpl.org/pub/elisp/'). | 1845 | and the x-face package (see URL `ftp://ftp.jpl.org/pub/elisp/'). |
| 1752 | 1846 | ||
| 1753 | Finally, MH-E will display images referenced by the \"X-Image-URL:\" header | 1847 | Finally, MH-E will display images referenced by the \"X-Image-URL:\" |
| 1754 | field if neither the \"Face:\" nor the \"X-Face:\" fields are present. The | 1848 | header field if neither the \"Face:\" nor the \"X-Face:\" fields are |
| 1755 | display of the images requires \"wget\" (see URL | 1849 | present. The display of the images requires \"wget\" (see URL |
| 1756 | `http://www.gnu.org/software/wget/wget.html'), \"fetch\", or \"curl\" to fetch | 1850 | `http://www.gnu.org/software/wget/wget.html'), \"fetch\", or \"curl\" |
| 1757 | the image and the \"convert\" program from the ImageMagick suite (see URL | 1851 | to fetch the image and the \"convert\" program from the ImageMagick |
| 1758 | `http://www.imagemagick.org/'). Of the three header fields this is the most | 1852 | suite (see URL `http://www.imagemagick.org/'). Of the three header |
| 1759 | efficient in terms of network usage since the image doesn't need to be | 1853 | fields this is the most efficient in terms of network usage since the |
| 1760 | transmitted with every single mail. | 1854 | image doesn't need to be transmitted with every single mail. |
| 1761 | 1855 | ||
| 1762 | The option `mh-fetch-x-image-url' controls the fetching of the | 1856 | The option `mh-fetch-x-image-url' controls the fetching of the |
| 1763 | \"X-Image-URL:\" header field image." | 1857 | \"X-Image-URL:\" header field image." |
| @@ -1767,9 +1861,10 @@ The option `mh-fetch-x-image-url' controls the fetching of the | |||
| 1767 | (defcustom mh-store-default-directory nil | 1861 | (defcustom mh-store-default-directory nil |
| 1768 | "*Default directory for \\<mh-folder-mode-map>\\[mh-store-msg]. | 1862 | "*Default directory for \\<mh-folder-mode-map>\\[mh-store-msg]. |
| 1769 | 1863 | ||
| 1770 | If you would like to change the initial default directory, customize this | 1864 | If you would like to change the initial default directory, |
| 1771 | option, change the value from `Current' to `Directory', and then enter the | 1865 | customize this option, change the value from `Current' to |
| 1772 | name of the directory for storing the content of these messages." | 1866 | `Directory', and then enter the name of the directory for storing |
| 1867 | the content of these messages." | ||
| 1773 | :type '(choice (const :tag "Current" nil) | 1868 | :type '(choice (const :tag "Current" nil) |
| 1774 | directory) | 1869 | directory) |
| 1775 | :group 'mh-show) | 1870 | :group 'mh-show) |
| @@ -1777,10 +1872,11 @@ name of the directory for storing the content of these messages." | |||
| 1777 | (defcustom mh-summary-height nil | 1872 | (defcustom mh-summary-height nil |
| 1778 | "*Number of lines in MH-Folder buffer (including the mode line). | 1873 | "*Number of lines in MH-Folder buffer (including the mode line). |
| 1779 | 1874 | ||
| 1780 | The default value of this option is \"Automatic\" which means that the | 1875 | The default value of this option is \"Automatic\" which means |
| 1781 | MH-Folder buffer will maintain the same proportional size if the frame is | 1876 | that the MH-Folder buffer will maintain the same proportional |
| 1782 | resized. If you'd prefer a fixed height, then choose the \"Fixed Size\" option | 1877 | size if the frame is resized. If you'd prefer a fixed height, |
| 1783 | and enter the number of lines you'd like to see." | 1878 | then choose the \"Fixed Size\" option and enter the number of |
| 1879 | lines you'd like to see." | ||
| 1784 | :type '(choice (const :tag "Automatic" nil) | 1880 | :type '(choice (const :tag "Automatic" nil) |
| 1785 | (integer :tag "Fixed Size")) | 1881 | (integer :tag "Fixed Size")) |
| 1786 | :group 'mh-show) | 1882 | :group 'mh-show) |
| @@ -1802,9 +1898,10 @@ Set to 0 to disable automatic update." | |||
| 1802 | (defcustom mh-show-threads-flag nil | 1898 | (defcustom mh-show-threads-flag nil |
| 1803 | "*Non-nil means new folders start in threaded mode. | 1899 | "*Non-nil means new folders start in threaded mode. |
| 1804 | 1900 | ||
| 1805 | Threading large number of messages can be time consuming so this option is | 1901 | Threading large number of messages can be time consuming so this |
| 1806 | turned off by default. If you turn this option on, then threading will be done | 1902 | option is turned off by default. If you turn this option on, then |
| 1807 | only if the number of messages being threaded is less than `mh-large-folder'." | 1903 | threading will be done only if the number of messages being |
| 1904 | threaded is less than `mh-large-folder'." | ||
| 1808 | :type 'boolean | 1905 | :type 'boolean |
| 1809 | :group 'mh-thread) | 1906 | :group 'mh-thread) |
| 1810 | 1907 | ||
| @@ -1816,8 +1913,8 @@ only if the number of messages being threaded is less than `mh-large-folder'." | |||
| 1816 | "*Function called by the tool bar search button. | 1913 | "*Function called by the tool bar search button. |
| 1817 | 1914 | ||
| 1818 | Available functions include `mh-search-folder', the default, and | 1915 | Available functions include `mh-search-folder', the default, and |
| 1819 | `mh-index-search'. You can also choose \"Other Function\" from the \"Value | 1916 | `mh-index-search'. You can also choose \"Other Function\" from |
| 1820 | Menu\" and enter a function of your own choosing." | 1917 | the \"Value Menu\" and enter a function of your own choosing." |
| 1821 | :type '(choice (const mh-search-folder) | 1918 | :type '(choice (const mh-search-folder) |
| 1822 | (const mh-index-search) | 1919 | (const mh-index-search) |
| 1823 | (function :tag "Other Function")) | 1920 | (function :tag "Other Function")) |
| @@ -1849,7 +1946,7 @@ Optional argument ARG is not used." | |||
| 1849 | 1946 | ||
| 1850 | (defmacro mh-tool-bar-reply-generator (function recipient folder-buffer-flag) | 1947 | (defmacro mh-tool-bar-reply-generator (function recipient folder-buffer-flag) |
| 1851 | "Generate FUNCTION that replies to RECIPIENT. | 1948 | "Generate FUNCTION that replies to RECIPIENT. |
| 1852 | If FOLDER-BUFFER-FLAG is nil then the function generated | 1949 | If FOLDER-BUFFER-FLAG is nil then the function generated... |
| 1853 | When INCLUDE-FLAG is non-nil, include message body being replied to." | 1950 | When INCLUDE-FLAG is non-nil, include message body being replied to." |
| 1854 | `(defun ,function (&optional arg) | 1951 | `(defun ,function (&optional arg) |
| 1855 | ,(format "Reply to \"%s\".\nWhen ARG is non-nil include message in reply." | 1952 | ,(format "Reply to \"%s\".\nWhen ARG is non-nil include message in reply." |
| @@ -1870,9 +1967,10 @@ When INCLUDE-FLAG is non-nil, include message body being replied to." | |||
| 1870 | (defcustom mh-xemacs-use-tool-bar-flag mh-xemacs-has-tool-bar-flag | 1967 | (defcustom mh-xemacs-use-tool-bar-flag mh-xemacs-has-tool-bar-flag |
| 1871 | "*If non-nil, use tool bar. | 1968 | "*If non-nil, use tool bar. |
| 1872 | 1969 | ||
| 1873 | This option controls whether to show the MH-E icons at all. By default, this | 1970 | This option controls whether to show the MH-E icons at all. By |
| 1874 | option is turned on if the window system supports tool bars. If your system | 1971 | default, this option is turned on if the window system supports |
| 1875 | doesn't support tool bars, then you won't be able to turn on this option." | 1972 | tool bars. If your system doesn't support tool bars, then you |
| 1973 | won't be able to turn on this option." | ||
| 1876 | :type 'boolean | 1974 | :type 'boolean |
| 1877 | :group 'mh-tool-bar | 1975 | :group 'mh-tool-bar |
| 1878 | :set (lambda (symbol value) | 1976 | :set (lambda (symbol value) |
| @@ -1884,11 +1982,12 @@ doesn't support tool bars, then you won't be able to turn on this option." | |||
| 1884 | (defcustom mh-xemacs-tool-bar-position nil | 1982 | (defcustom mh-xemacs-tool-bar-position nil |
| 1885 | "*Tool bar location. | 1983 | "*Tool bar location. |
| 1886 | 1984 | ||
| 1887 | This option controls the placement of the tool bar along the four edges of the | 1985 | This option controls the placement of the tool bar along the four |
| 1888 | frame. You can choose from one of \"Same As Default Tool Bar\", \"Top\", | 1986 | edges of the frame. You can choose from one of \"Same As Default |
| 1889 | \"Bottom\", \"Left\", or \"Right\". If this variable is set to anything other | 1987 | Tool Bar\", \"Top\", \"Bottom\", \"Left\", or \"Right\". If this |
| 1890 | than \"Same As Default Tool Bar\" and the default tool bar is in a different | 1988 | variable is set to anything other than \"Same As Default Tool |
| 1891 | location, then two tool bars will be displayed: the MH-E tool bar and the | 1989 | Bar\" and the default tool bar is in a different location, then |
| 1990 | two tool bars will be displayed: the MH-E tool bar and the | ||
| 1892 | default tool bar." | 1991 | default tool bar." |
| 1893 | :type '(radio (const :tag "Same As Default Tool Bar" :value nil) | 1992 | :type '(radio (const :tag "Same As Default Tool Bar" :value nil) |
| 1894 | (const :tag "Top" :value top) | 1993 | (const :tag "Top" :value top) |
| @@ -1907,47 +2006,49 @@ default tool bar." | |||
| 1907 | 2006 | ||
| 1908 | (defmacro mh-tool-bar-define (defaults &rest buttons) | 2007 | (defmacro mh-tool-bar-define (defaults &rest buttons) |
| 1909 | "Define a tool bar for MH-E. | 2008 | "Define a tool bar for MH-E. |
| 1910 | DEFAULTS is the list of buttons that are present by default. It is a list of | 2009 | DEFAULTS is the list of buttons that are present by default. It |
| 1911 | lists where the sublists are of the following form: | 2010 | is a list of lists where the sublists are of the following form: |
| 1912 | 2011 | ||
| 1913 | (:KEYWORD FUNC1 FUNC2 FUNC3 ...) | 2012 | (:KEYWORD FUNC1 FUNC2 FUNC3 ...) |
| 1914 | 2013 | ||
| 1915 | Here :KEYWORD is one of :folder or :letter. If it is :folder then the default | 2014 | Here :KEYWORD is one of :folder or :letter. If it is :folder then |
| 1916 | buttons in the folder and show mode buffers are being specified. If it is | 2015 | the default buttons in the folder and show mode buffers are being |
| 1917 | :letter then the default buttons in the letter mode are listed. FUNC1, FUNC2, | 2016 | specified. If it is :letter then the default buttons in the |
| 1918 | FUNC3, ... are the names of the functions that the buttons would execute. | 2017 | letter mode are listed. FUNC1, FUNC2, FUNC3, ... are the names of |
| 2018 | the functions that the buttons would execute. | ||
| 1919 | 2019 | ||
| 1920 | Each element of BUTTONS is a list consisting of four mandatory items and one | 2020 | Each element of BUTTONS is a list consisting of four mandatory |
| 1921 | optional item as follows: | 2021 | items and one optional item as follows: |
| 1922 | 2022 | ||
| 1923 | (FUNCTION MODES ICON DOC &optional ENABLE-EXPR) | 2023 | (FUNCTION MODES ICON DOC &optional ENABLE-EXPR) |
| 1924 | 2024 | ||
| 1925 | where, | 2025 | where, |
| 1926 | 2026 | ||
| 1927 | FUNCTION is the name of the function that will be executed when the button | 2027 | FUNCTION is the name of the function that will be executed when |
| 1928 | is clicked. | 2028 | the button is clicked. |
| 1929 | 2029 | ||
| 1930 | MODES is a list of symbols. List elements must be from `folder', `letter' and | 2030 | MODES is a list of symbols. List elements must be from `folder', |
| 1931 | `sequence'. If `folder' is present then the button is available in the | 2031 | `letter' and `sequence'. If `folder' is present then the button is |
| 1932 | folder and show buffer. If the name of FUNCTION is of the form \"mh-foo\", | 2032 | available in the folder and show buffer. If the name of FUNCTION is |
| 1933 | where foo is some arbitrary string, then we check if the function | 2033 | of the form \"mh-foo\", where foo is some arbitrary string, then we |
| 1934 | `mh-show-foo' exists. If it exists then that function is used in the show | 2034 | check if the function `mh-show-foo' exists. If it exists then that |
| 1935 | buffer. Otherwise the original function `mh-foo' is used in the show buffer | 2035 | function is used in the show buffer. Otherwise the original function |
| 1936 | as well. Presence of `sequence' is handled similar to the above. The only | 2036 | `mh-foo' is used in the show buffer as well. Presence of `sequence' |
| 1937 | difference is that the button is shown only when the folder is narrowed to a | 2037 | is handled similar to the above. The only difference is that the |
| 1938 | sequence. If `letter' is present in MODES, then the button is available | 2038 | button is shown only when the folder is narrowed to a sequence. If |
| 1939 | during draft editing and runs FUNCTION when clicked. | 2039 | `letter' is present in MODES, then the button is available during |
| 2040 | draft editing and runs FUNCTION when clicked. | ||
| 1940 | 2041 | ||
| 1941 | ICON is the icon that is drawn in the button. | 2042 | ICON is the icon that is drawn in the button. |
| 1942 | 2043 | ||
| 1943 | DOC is the documentation for the button. It is used in tool-tips and in | 2044 | DOC is the documentation for the button. It is used in tool-tips and |
| 1944 | providing other help to the user. GNU Emacs uses only the first line of the | 2045 | in providing other help to the user. GNU Emacs uses only the first |
| 1945 | string. So the DOC should be formatted such that the first line is useful and | 2046 | line of the string. So the DOC should be formatted such that the |
| 1946 | complete without the rest of the string. | 2047 | first line is useful and complete without the rest of the string. |
| 1947 | 2048 | ||
| 1948 | Optional item ENABLE-EXPR is an arbitrary lisp expression. If it evaluates | 2049 | Optional item ENABLE-EXPR is an arbitrary lisp expression. If it |
| 1949 | to nil, then the button is deactivated, otherwise it is active. If is in't | 2050 | evaluates to nil, then the button is deactivated, otherwise it is |
| 1950 | present then the button is always active." | 2051 | active. If is in't present then the button is always active." |
| 1951 | ;; The following variable names have been carefully chosen to make code | 2052 | ;; The following variable names have been carefully chosen to make code |
| 1952 | ;; generation easier. Modifying the names should be done carefully. | 2053 | ;; generation easier. Modifying the names should be done carefully. |
| 1953 | (let (folder-buttons folder-docs folder-button-setter sequence-button-setter | 2054 | (let (folder-buttons folder-docs folder-button-setter sequence-button-setter |
| @@ -2237,10 +2338,10 @@ This button runs `mh-previous-undeleted-msg'") | |||
| 2237 | (defcustom mh-after-commands-processed-hook nil | 2338 | (defcustom mh-after-commands-processed-hook nil |
| 2238 | "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] after performing outstanding requests. | 2339 | "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] after performing outstanding requests. |
| 2239 | 2340 | ||
| 2240 | Variables that are useful in this hook include `mh-folders-changed', | 2341 | Variables that are useful in this hook include |
| 2241 | which lists which folders were affected by deletes and refiles. This | 2342 | `mh-folders-changed', which lists which folders were affected by |
| 2242 | list will always include the current folder, which is also available | 2343 | deletes and refiles. This list will always include the current |
| 2243 | in `mh-current-folder'." | 2344 | folder, which is also available in `mh-current-folder'." |
| 2244 | :type 'hook | 2345 | :type 'hook |
| 2245 | :group 'mh-hooks | 2346 | :group 'mh-hooks |
| 2246 | :group 'mh-folder) | 2347 | :group 'mh-folder) |
| @@ -2254,9 +2355,9 @@ in `mh-current-folder'." | |||
| 2254 | (defcustom mh-before-commands-processed-hook nil | 2355 | (defcustom mh-before-commands-processed-hook nil |
| 2255 | "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] before performing outstanding requests. | 2356 | "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] before performing outstanding requests. |
| 2256 | 2357 | ||
| 2257 | Variables that are useful in this hook include `mh-delete-list' and | 2358 | Variables that are useful in this hook include `mh-delete-list' |
| 2258 | `mh-refile-list' which can be used to see which changes will be made | 2359 | and `mh-refile-list' which can be used to see which changes will |
| 2259 | to the current folder, `mh-current-folder'." | 2360 | be made to the current folder, `mh-current-folder'." |
| 2260 | :type 'hook | 2361 | :type 'hook |
| 2261 | :group 'mh-hooks | 2362 | :group 'mh-hooks |
| 2262 | :group 'mh-folder) | 2363 | :group 'mh-folder) |
| @@ -2264,9 +2365,9 @@ to the current folder, `mh-current-folder'." | |||
| 2264 | (defcustom mh-before-quit-hook nil | 2365 | (defcustom mh-before-quit-hook nil |
| 2265 | "Hook run by \\<mh-folder-mode-map>\\[mh-quit] before quitting MH-E. | 2366 | "Hook run by \\<mh-folder-mode-map>\\[mh-quit] before quitting MH-E. |
| 2266 | 2367 | ||
| 2267 | This hook is called before the quit occurs, so you might use it to | 2368 | This hook is called before the quit occurs, so you might use it |
| 2268 | perform any MH-E operations; you could perform some query and abort | 2369 | to perform any MH-E operations; you could perform some query and |
| 2269 | the quit or call `mh-execute-commands', for example. | 2370 | abort the quit or call `mh-execute-commands', for example. |
| 2270 | 2371 | ||
| 2271 | See also `mh-quit-hook'." | 2372 | See also `mh-quit-hook'." |
| 2272 | :type 'hook | 2373 | :type 'hook |
| @@ -2276,8 +2377,8 @@ See also `mh-quit-hook'." | |||
| 2276 | (defcustom mh-before-send-letter-hook nil | 2377 | (defcustom mh-before-send-letter-hook nil |
| 2277 | "Hook run at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command. | 2378 | "Hook run at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command. |
| 2278 | 2379 | ||
| 2279 | For example, if you want to check your spelling in your message before | 2380 | For example, if you want to check your spelling in your message |
| 2280 | sending, add the `ispell-message' function." | 2381 | before sending, add the `ispell-message' function." |
| 2281 | :type 'hook | 2382 | :type 'hook |
| 2282 | :options '(ispell-message) | 2383 | :options '(ispell-message) |
| 2283 | :group 'mh-hooks | 2384 | :group 'mh-hooks |
| @@ -2286,8 +2387,8 @@ sending, add the `ispell-message' function." | |||
| 2286 | (defcustom mh-delete-msg-hook nil | 2387 | (defcustom mh-delete-msg-hook nil |
| 2287 | "Hook run by \\<mh-letter-mode-map>\\[mh-delete-msg] after marking each message for deletion. | 2388 | "Hook run by \\<mh-letter-mode-map>\\[mh-delete-msg] after marking each message for deletion. |
| 2288 | 2389 | ||
| 2289 | For example, a past maintainer of MH-E used this once when he kept | 2390 | For example, a past maintainer of MH-E used this once when he |
| 2290 | statistics on his mail usage." | 2391 | kept statistics on his mail usage." |
| 2291 | :type 'hook | 2392 | :type 'hook |
| 2292 | :group 'mh-hooks | 2393 | :group 'mh-hooks |
| 2293 | :group 'mh-show) | 2394 | :group 'mh-show) |
| @@ -2296,8 +2397,8 @@ statistics on his mail usage." | |||
| 2296 | "Hook run by `mh-find-path' after reading the user's MH profile. | 2397 | "Hook run by `mh-find-path' after reading the user's MH profile. |
| 2297 | 2398 | ||
| 2298 | This hook can be used the change the value of the variables that | 2399 | This hook can be used the change the value of the variables that |
| 2299 | `mh-find-path' sets if you need to run with different values between | 2400 | `mh-find-path' sets if you need to run with different values |
| 2300 | MH and MH-E." | 2401 | between MH and MH-E." |
| 2301 | :type 'hook | 2402 | :type 'hook |
| 2302 | :group 'mh-hooks | 2403 | :group 'mh-hooks |
| 2303 | :group 'mh-e) | 2404 | :group 'mh-e) |
| @@ -2323,8 +2424,9 @@ MH and MH-E." | |||
| 2323 | (defcustom mh-insert-signature-hook nil | 2424 | (defcustom mh-insert-signature-hook nil |
| 2324 | "Hook run by \\<mh-letter-mode-map>\\[mh-insert-signature] after signature has been inserted. | 2425 | "Hook run by \\<mh-letter-mode-map>\\[mh-insert-signature] after signature has been inserted. |
| 2325 | 2426 | ||
| 2326 | Hook functions may access the actual name of the file or the function | 2427 | Hook functions may access the actual name of the file or the |
| 2327 | used to insert the signature with `mh-signature-file-name'." | 2428 | function used to insert the signature with |
| 2429 | `mh-signature-file-name'." | ||
| 2328 | :type 'hook | 2430 | :type 'hook |
| 2329 | :group 'mh-hooks | 2431 | :group 'mh-hooks |
| 2330 | :group 'mh-letter) | 2432 | :group 'mh-letter) |
| @@ -2332,16 +2434,16 @@ used to insert the signature with `mh-signature-file-name'." | |||
| 2332 | (defcustom mh-kill-folder-suppress-prompt-hooks '(mh-index-p) | 2434 | (defcustom mh-kill-folder-suppress-prompt-hooks '(mh-index-p) |
| 2333 | "Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder]. | 2435 | "Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder]. |
| 2334 | 2436 | ||
| 2335 | The hook functions are called with no arguments and should return a | 2437 | The hook functions are called with no arguments and should return |
| 2336 | non-nil value to suppress the normal prompt when you remove a folder. | 2438 | a non-nil value to suppress the normal prompt when you remove a |
| 2337 | This is useful for folders that are easily regenerated. | 2439 | folder. This is useful for folders that are easily regenerated. |
| 2338 | 2440 | ||
| 2339 | The default value of `mh-index-p' suppresses the prompt on folders | 2441 | The default value of `mh-index-p' suppresses the prompt on |
| 2340 | generated by an index search. | 2442 | folders generated by an index search. |
| 2341 | 2443 | ||
| 2342 | WARNING: Use this hook with care. If there is a bug in your hook which | 2444 | WARNING: Use this hook with care. If there is a bug in your hook |
| 2343 | returns t on \"+inbox\" and you hit \\[mh-kill-folder] by accident in | 2445 | which returns t on \"+inbox\" and you hit \\[mh-kill-folder] by |
| 2344 | the \"+inbox\" folder, you will not be happy." | 2446 | accident in the \"+inbox\" folder, you will not be happy." |
| 2345 | :type 'hook | 2447 | :type 'hook |
| 2346 | :group 'mh-hooks | 2448 | :group 'mh-hooks |
| 2347 | :group 'mh-folder) | 2449 | :group 'mh-folder) |
| @@ -2349,10 +2451,11 @@ the \"+inbox\" folder, you will not be happy." | |||
| 2349 | (defcustom mh-letter-mode-hook nil | 2451 | (defcustom mh-letter-mode-hook nil |
| 2350 | "Hook run by `mh-letter-mode' on a new letter. | 2452 | "Hook run by `mh-letter-mode' on a new letter. |
| 2351 | 2453 | ||
| 2352 | This hook allows you to do some processing before editing a letter. | 2454 | This hook allows you to do some processing before editing a |
| 2353 | For example, you may wish to modify the header after \"repl\" has done | 2455 | letter. For example, you may wish to modify the header after |
| 2354 | its work, or you may have a complicated \"components\" file and need | 2456 | \"repl\" has done its work, or you may have a complicated |
| 2355 | to tell MH-E where the cursor should go." | 2457 | \"components\" file and need to tell MH-E where the cursor should |
| 2458 | go." | ||
| 2356 | :type 'hook | 2459 | :type 'hook |
| 2357 | :group 'mh-hooks | 2460 | :group 'mh-hooks |
| 2358 | :group 'mh-sending-mail) | 2461 | :group 'mh-sending-mail) |
| @@ -2366,10 +2469,10 @@ to tell MH-E where the cursor should go." | |||
| 2366 | (defcustom mh-pick-mode-hook nil | 2469 | (defcustom mh-pick-mode-hook nil |
| 2367 | "Hook run upon entry to `mh-pick-mode'\\<mh-folder-mode-map>. | 2470 | "Hook run upon entry to `mh-pick-mode'\\<mh-folder-mode-map>. |
| 2368 | 2471 | ||
| 2369 | If you find that you do the same thing over and over when editing the | 2472 | If you find that you do the same thing over and over when editing |
| 2370 | search template, you may wish to bind some shortcuts to keys. This can | 2473 | the search template, you may wish to bind some shortcuts to keys. |
| 2371 | be done with this hook which is called when \\[mh-search-folder] is | 2474 | This can be done with this hook which is called when |
| 2372 | run on a new pattern." | 2475 | \\[mh-search-folder] is run on a new pattern." |
| 2373 | :type 'hook | 2476 | :type 'hook |
| 2374 | :group 'mh-hooks | 2477 | :group 'mh-hooks |
| 2375 | :group 'mh-index) | 2478 | :group 'mh-index) |
| @@ -2377,8 +2480,8 @@ run on a new pattern." | |||
| 2377 | (defcustom mh-quit-hook nil | 2480 | (defcustom mh-quit-hook nil |
| 2378 | "Hook run by \\<mh-folder-mode-map>\\[mh-quit] after quitting MH-E. | 2481 | "Hook run by \\<mh-folder-mode-map>\\[mh-quit] after quitting MH-E. |
| 2379 | 2482 | ||
| 2380 | This hook is not run in an MH-E context, so you might use it to modify | 2483 | This hook is not run in an MH-E context, so you might use it to |
| 2381 | the window setup. | 2484 | modify the window setup. |
| 2382 | 2485 | ||
| 2383 | See also `mh-before-quit-hook'." | 2486 | See also `mh-before-quit-hook'." |
| 2384 | :type 'hook | 2487 | :type 'hook |
| @@ -2394,9 +2497,9 @@ See also `mh-before-quit-hook'." | |||
| 2394 | (defcustom mh-show-hook nil | 2497 | (defcustom mh-show-hook nil |
| 2395 | "Hook run after \\<mh-folder-mode-map>\\[mh-show] shows a message. | 2498 | "Hook run after \\<mh-folder-mode-map>\\[mh-show] shows a message. |
| 2396 | 2499 | ||
| 2397 | It is the last thing called after messages are displayed. It's used to | 2500 | It is the last thing called after messages are displayed. It's |
| 2398 | affect the behavior of MH-E in general or when `mh-show-mode-hook' is | 2501 | used to affect the behavior of MH-E in general or when |
| 2399 | too early." | 2502 | `mh-show-mode-hook' is too early." |
| 2400 | :type 'hook | 2503 | :type 'hook |
| 2401 | :group 'mh-hooks | 2504 | :group 'mh-hooks |
| 2402 | :group 'mh-show) | 2505 | :group 'mh-show) |
| @@ -2404,8 +2507,9 @@ too early." | |||
| 2404 | (defcustom mh-show-mode-hook nil | 2507 | (defcustom mh-show-mode-hook nil |
| 2405 | "Hook run upon entry to `mh-show-mode'. | 2508 | "Hook run upon entry to `mh-show-mode'. |
| 2406 | 2509 | ||
| 2407 | This hook is called early on in the process of the message display. It | 2510 | This hook is called early on in the process of the message |
| 2408 | is usually used to perform some action on the message's content." | 2511 | display. It is usually used to perform some action on the |
| 2512 | message's content." | ||
| 2409 | :type 'hook | 2513 | :type 'hook |
| 2410 | :group 'mh-hooks | 2514 | :group 'mh-hooks |
| 2411 | :group 'mh-show) | 2515 | :group 'mh-show) |
| @@ -2413,8 +2517,9 @@ is usually used to perform some action on the message's content." | |||
| 2413 | (defcustom mh-unseen-updated-hook nil | 2517 | (defcustom mh-unseen-updated-hook nil |
| 2414 | "Hook run after the unseen sequence has been updated. | 2518 | "Hook run after the unseen sequence has been updated. |
| 2415 | 2519 | ||
| 2416 | The variable `mh-seen-list' can be used by this hook to obtain the | 2520 | The variable `mh-seen-list' can be used by this hook to obtain |
| 2417 | list of messages which were removed from the unseen sequence." | 2521 | the list of messages which were removed from the unseen |
| 2522 | sequence." | ||
| 2418 | :type 'hook | 2523 | :type 'hook |
| 2419 | :group 'mh-hooks | 2524 | :group 'mh-hooks |
| 2420 | :group 'mh-sequences) | 2525 | :group 'mh-sequences) |
| @@ -2693,7 +2798,8 @@ list of messages which were removed from the unseen sequence." | |||
| 2693 | 2798 | ||
| 2694 | (defvar mh-show-pgg-unknown-face 'mh-show-pgg-unknown | 2799 | (defvar mh-show-pgg-unknown-face 'mh-show-pgg-unknown |
| 2695 | "Face used to highlight a PGG signature whose status is unknown. | 2800 | "Face used to highlight a PGG signature whose status is unknown. |
| 2696 | This face is also used for a signature when the signer is untrusted.") | 2801 | This face is also used for a signature when the signer is |
| 2802 | untrusted.") | ||
| 2697 | (defface mh-show-pgg-unknown | 2803 | (defface mh-show-pgg-unknown |
| 2698 | '((t | 2804 | '((t |
| 2699 | (:bold t :foreground "DarkGoldenrod2"))) | 2805 | (:bold t :foreground "DarkGoldenrod2"))) |
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index e0a8c3a004f..6a50563585a 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el | |||
| @@ -102,7 +102,8 @@ | |||
| 102 | 102 | ||
| 103 | (defvar mh-partial-folder-mode-line-annotation "select" | 103 | (defvar mh-partial-folder-mode-line-annotation "select" |
| 104 | "Annotation when displaying part of a folder. | 104 | "Annotation when displaying part of a folder. |
| 105 | The string is displayed after the folder's name. nil for no annotation.") | 105 | The string is displayed after the folder's name. nil for no |
| 106 | annotation.") | ||
| 106 | 107 | ||
| 107 | 108 | ||
| 108 | 109 | ||
| @@ -133,15 +134,16 @@ The string is displayed after the folder's name. nil for no annotation.") | |||
| 133 | "%<(zero)%17(friendly{from})%> " | 134 | "%<(zero)%17(friendly{from})%> " |
| 134 | "%{subject}%<{body}<<%{body}%>") | 135 | "%{subject}%<{body}<<%{body}%>") |
| 135 | "*Scan format string for MH. | 136 | "*Scan format string for MH. |
| 136 | This string is passed to the scan program via the -format argument. | 137 | This string is passed to the scan program via the -format |
| 137 | This format is identical to the default except that additional hints for | 138 | argument. This format is identical to the default except that |
| 138 | fontification have been added to the fifth column (remember that in Emacs, the | 139 | additional hints for fontification have been added to the fifth |
| 139 | first column is 0). | 140 | column (remember that in Emacs, the first column is 0). |
| 140 | 141 | ||
| 141 | The values of the fifth column, in priority order, are: `-' if the message has | 142 | The values of the fifth column, in priority order, are: `-' if |
| 142 | been replied to, t if an address on the To: line matches one of the | 143 | the message has been replied to, t if an address on the To: line |
| 143 | mailboxes of the current user, `c' if the Cc: line matches, `b' if the Bcc: | 144 | matches one of the mailboxes of the current user, `c' if the Cc: |
| 144 | line matches, and `n' if a non-empty Newsgroups: header is present.") | 145 | line matches, `b' if the Bcc: line matches, and `n' if a |
| 146 | non-empty Newsgroups: header is present.") | ||
| 145 | 147 | ||
| 146 | (defvar mh-scan-format-nmh | 148 | (defvar mh-scan-format-nmh |
| 147 | (concat | 149 | (concat |
| @@ -159,14 +161,15 @@ line matches, and `n' if a non-empty Newsgroups: header is present.") | |||
| 159 | "%(decode{subject})%<{body}<<%{body}%>") | 161 | "%(decode{subject})%<{body}<<%{body}%>") |
| 160 | "*Scan format string for nmh. | 162 | "*Scan format string for nmh. |
| 161 | This string is passed to the scan program via the -format arg. | 163 | This string is passed to the scan program via the -format arg. |
| 162 | This format is identical to the default except that additional hints for | 164 | This format is identical to the default except that additional |
| 163 | fontification have been added to the fifth column (remember that in Emacs, the | 165 | hints for fontification have been added to the fifth |
| 164 | first column is 0). | 166 | column (remember that in Emacs, the first column is 0). |
| 165 | 167 | ||
| 166 | The values of the fifth column, in priority order, are: `-' if the message has | 168 | The values of the fifth column, in priority order, are: `-' if |
| 167 | been replied to, t if an address on the To: field matches one of the | 169 | the message has been replied to, t if an address on the To: field |
| 168 | mailboxes of the current user, `c' if the Cc: field matches, `b' if the Bcc: | 170 | matches one of the mailboxes of the current user, `c' if the Cc: |
| 169 | field matches, and `n' if a non-empty Newsgroups: field is present.") | 171 | field matches, `b' if the Bcc: field matches, and `n' if a |
| 172 | non-empty Newsgroups: field is present.") | ||
| 170 | 173 | ||
| 171 | (defvar mh-note-deleted ?D | 174 | (defvar mh-note-deleted ?D |
| 172 | "Messages that have been deleted are marked by this character. | 175 | "Messages that have been deleted are marked by this character. |
| @@ -182,101 +185,140 @@ See also `mh-scan-cur-msg-number-regexp'.") | |||
| 182 | 185 | ||
| 183 | (defvar mh-scan-good-msg-regexp "^\\( *[0-9]+\\)[^D^0-9]" | 186 | (defvar mh-scan-good-msg-regexp "^\\( *[0-9]+\\)[^D^0-9]" |
| 184 | "This regular expression matches \"good\" messages. | 187 | "This regular expression matches \"good\" messages. |
| 185 | It must match from the beginning of the line. Note that the default setting of | 188 | |
| 186 | `mh-folder-font-lock-keywords' expects this expression to contain at least one | 189 | It must match from the beginning of the line. Note that the |
| 187 | parenthesized expression which matches the message number as in the default of | 190 | default setting of `mh-folder-font-lock-keywords' expects this |
| 188 | \"^\\\\( *[0-9]+\\\\)[^D^0-9]\". This expression includes the leading space | 191 | expression to contain at least one parenthesized expression which |
| 189 | within the parenthesis since it looks better to highlight it as well. This | 192 | matches the message number as in the default of |
| 190 | regular expression should be correct as it is needed by non-fontification | 193 | |
| 194 | \"^\\\\( *[0-9]+\\\\)[^D^0-9]\". | ||
| 195 | |||
| 196 | This expression includes the leading space within the parenthesis | ||
| 197 | since it looks better to highlight it as well. This regular | ||
| 198 | expression should be correct as it is needed by non-fontification | ||
| 191 | functions.") | 199 | functions.") |
| 192 | 200 | ||
| 193 | (defvar mh-scan-deleted-msg-regexp "^\\( *[0-9]+\\)D" | 201 | (defvar mh-scan-deleted-msg-regexp "^\\( *[0-9]+\\)D" |
| 194 | "This regular expression matches deleted messages. | 202 | "This regular expression matches deleted messages. |
| 195 | It must match from the beginning of the line. Note that the default setting of | 203 | |
| 196 | `mh-folder-font-lock-keywords' expects this expression to contain at least one | 204 | It must match from the beginning of the line. Note that the |
| 197 | parenthesized expression which matches the message number as in the default of | 205 | default setting of `mh-folder-font-lock-keywords' expects this |
| 198 | \"^\\\\( *[0-9]+\\\\)D\". This expression includes the leading space within | 206 | expression to contain at least one parenthesized expression which |
| 199 | the parenthesis since it looks better to highlight it as well. This regular | 207 | matches the message number as in the default of |
| 200 | expression should be correct as it is needed by non-fontification functions. | 208 | |
| 201 | See also `mh-note-deleted'.") | 209 | \"^\\\\( *[0-9]+\\\\)D\". |
| 210 | |||
| 211 | This expression includes the leading space within the parenthesis | ||
| 212 | since it looks better to highlight it as well. This regular | ||
| 213 | expression should be correct as it is needed by non-fontification | ||
| 214 | functions. See also `mh-note-deleted'.") | ||
| 202 | 215 | ||
| 203 | (defvar mh-scan-refiled-msg-regexp "^\\( *[0-9]+\\)\\^" | 216 | (defvar mh-scan-refiled-msg-regexp "^\\( *[0-9]+\\)\\^" |
| 204 | "This regular expression matches refiled messages. | 217 | "This regular expression matches refiled messages. |
| 205 | It must match from the beginning of the line. Note that the default setting of | 218 | |
| 206 | `mh-folder-font-lock-keywords' expects this expression to contain at least one | 219 | It must match from the beginning of the line. Note that the |
| 207 | parenthesized expression which matches the message number as in the default of | 220 | default setting of `mh-folder-font-lock-keywords' expects this |
| 208 | \"^\\\\( *[0-9]+\\\\)\\\\^\". This expression includes the leading space | 221 | expression to contain at least one parenthesized expression which |
| 209 | within the parenthesis since it looks better to highlight it as well. This | 222 | matches the message number as in the default of |
| 210 | regular expression should be correct as it is needed by non-fontification | 223 | |
| 224 | \"^\\\\( *[0-9]+\\\\)\\\\^\". | ||
| 225 | |||
| 226 | This expression includes the leading space within the parenthesis | ||
| 227 | since it looks better to highlight it as well. This regular | ||
| 228 | expression should be correct as it is needed by non-fontification | ||
| 211 | functions. See also `mh-note-refiled'.") | 229 | functions. See also `mh-note-refiled'.") |
| 212 | 230 | ||
| 213 | (defvar mh-scan-valid-regexp "^ *[0-9]" | 231 | (defvar mh-scan-valid-regexp "^ *[0-9]" |
| 214 | "This regular expression describes a valid scan line. | 232 | "This regular expression describes a valid scan line. |
| 215 | This is used to eliminate error messages that are occasionally produced by | 233 | |
| 216 | \"inc\".") | 234 | This is used to eliminate error messages that are occasionally |
| 235 | produced by \"inc\".") | ||
| 217 | 236 | ||
| 218 | (defvar mh-scan-cur-msg-number-regexp "^\\( *[0-9]+\\+\\).*" | 237 | (defvar mh-scan-cur-msg-number-regexp "^\\( *[0-9]+\\+\\).*" |
| 219 | "This regular expression matches the current message. | 238 | "This regular expression matches the current message. |
| 220 | It must match from the beginning of the line. Note that the default setting of | 239 | |
| 221 | `mh-folder-font-lock-keywords' expects this expression to contain at least one | 240 | It must match from the beginning of the line. Note that the |
| 222 | parenthesized expression which matches the message number as in the default of | 241 | default setting of `mh-folder-font-lock-keywords' expects this |
| 223 | \"^\\\\( *[0-9]+\\\\+\\\\).*\". This expression includes the leading space and | 242 | expression to contain at least one parenthesized expression which |
| 224 | current message marker \"+\" within the parenthesis since it looks better to | 243 | matches the message number as in the default of |
| 225 | highlight these items as well. This regular expression should be correct as it | 244 | |
| 226 | is needed by non-fontification functions. See also `mh-note-cur'.") | 245 | \"^\\\\( *[0-9]+\\\\+\\\\).*\". |
| 246 | |||
| 247 | This expression includes the leading space and current message | ||
| 248 | marker \"+\" within the parenthesis since it looks better to | ||
| 249 | highlight these items as well. This regular expression should be | ||
| 250 | correct as it is needed by non-fontification functions. See also | ||
| 251 | `mh-note-cur'.") | ||
| 227 | 252 | ||
| 228 | (defvar mh-scan-date-regexp "\\([0-9][0-9]/[0-9][0-9]\\)" | 253 | (defvar mh-scan-date-regexp "\\([0-9][0-9]/[0-9][0-9]\\)" |
| 229 | "This regular expression matches a valid date. | 254 | "This regular expression matches a valid date. |
| 230 | It must not be anchored to the beginning or the end of the line. Note that the | 255 | |
| 231 | default setting of `mh-folder-font-lock-keywords' expects this expression to | 256 | It must not be anchored to the beginning or the end of the line. |
| 232 | contain only one parenthesized expression which matches the date field as in | 257 | Note that the default setting of `mh-folder-font-lock-keywords' |
| 233 | the default of \"\\\\([0-9][0-9]/[0-9][0-9]\\\\)\"}. If this regular | 258 | expects this expression to contain only one parenthesized |
| 234 | expression is not correct, the date will not be highlighted. See also | 259 | expression which matches the date field as in the default of |
| 260 | \"\\\\([0-9][0-9]/[0-9][0-9]\\\\)\"}. If this regular expression | ||
| 261 | is not correct, the date will not be highlighted. See also | ||
| 235 | `mh-scan-format-regexp'.") | 262 | `mh-scan-format-regexp'.") |
| 236 | 263 | ||
| 237 | (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)" | 264 | (defvar mh-scan-rcpt-regexp "\\(To:\\)\\(..............\\)" |
| 238 | "This regular expression specifies the recipient in messages you sent. | 265 | "This regular expression specifies the recipient in messages you sent. |
| 266 | |||
| 239 | Note that the default setting of `mh-folder-font-lock-keywords' | 267 | Note that the default setting of `mh-folder-font-lock-keywords' |
| 240 | expects this expression to contain two parenthesized expressions. The | 268 | expects this expression to contain two parenthesized expressions. |
| 241 | first is expected to match the `To:' that the default scan format | 269 | The first is expected to match the `To:' that the default scan |
| 242 | file generates. The second is expected to match the recipient's name | 270 | format file generates. The second is expected to match the |
| 243 | as in the default of \"\\\\(To:\\\\)\\\\(..............\\\\)\". If this | 271 | recipient's name as in the default of |
| 244 | regular expression is not correct, the recipient will not be highlighted.") | 272 | \"\\\\(To:\\\\)\\\\(..............\\\\)\". If this regular |
| 273 | expression is not correct, the recipient will not be | ||
| 274 | highlighted.") | ||
| 245 | 275 | ||
| 246 | (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)" | 276 | (defvar mh-scan-body-regexp "\\(<<\\([^\n]+\\)?\\)" |
| 247 | "This regular expression matches the message body fragment. | 277 | "This regular expression matches the message body fragment. |
| 248 | Note that the default setting of `mh-folder-font-lock-keywords' expects this | 278 | |
| 249 | expression to contain at least one parenthesized expression which matches the | 279 | Note that the default setting of `mh-folder-font-lock-keywords' |
| 250 | body text as in the default of \"\\\\(<<\\\\([^\\n]+\\\\)?\\\\)\". If this | 280 | expects this expression to contain at least one parenthesized |
| 251 | regular expression is not correct, the body fragment will not be highlighted.") | 281 | expression which matches the body text as in the default of |
| 282 | \"\\\\(<<\\\\([^\\n]+\\\\)?\\\\)\". If this regular expression is | ||
| 283 | not correct, the body fragment will not be highlighted.") | ||
| 252 | 284 | ||
| 253 | (defvar mh-scan-subject-regexp | 285 | (defvar mh-scan-subject-regexp |
| 254 | "^ *[0-9]+........[ ]*...................\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)" | 286 | "^ *[0-9]+........[ ]*...................\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)" |
| 255 | "This regular expression matches the subject. | 287 | "This regular expression matches the subject. |
| 256 | It must match from the beginning of the line. Note that the default setting | 288 | |
| 257 | of `mh-folder-font-lock-keywords' expects this expression to contain at least | 289 | It must match from the beginning of the line. Note that the |
| 258 | three parenthesized expressions. The first is expected to match the `Re:' | 290 | default setting of `mh-folder-font-lock-keywords' expects this |
| 259 | string, if any. The second matches an optional bracketed number after `Re:', | 291 | expression to contain at least three parenthesized expressions. |
| 260 | such as in `Re[2]:' (and is thus a sub-expression of the first expression) and | 292 | The first is expected to match the `Re:' string, if any. The |
| 261 | the third is expected to match the subject line itself as in the default of | 293 | second matches an optional bracketed number after `Re:', such as |
| 262 | \(broken on multiple lines for readability): | 294 | in `Re[2]:' (and is thus a sub-expression of the first |
| 295 | expression) and the third is expected to match the subject line | ||
| 296 | itself as in the default of \(broken on multiple lines for | ||
| 297 | readability): | ||
| 298 | |||
| 263 | ^ *[0-9]+........[ ]*................... | 299 | ^ *[0-9]+........[ ]*................... |
| 264 | \\\\([Rr][Ee]\\\\(\\\\\\=[[0-9]+\\\\]\\\\)?:\\\\s-*\\\\)* | 300 | \\\\([Rr][Ee]\\\\(\\\\\\=[[0-9]+\\\\]\\\\)?:\\\\s-*\\\\)* |
| 265 | \\\\([^<\\n]*\\\\) | 301 | \\\\([^<\\n]*\\\\) |
| 266 | This regular expression should be correct as it is needed by non-fontification | 302 | |
| 267 | functions.") | 303 | This regular expression should be correct as it is needed by |
| 304 | non-fontification functions.") | ||
| 268 | 305 | ||
| 269 | (defvar mh-scan-format-regexp | 306 | (defvar mh-scan-format-regexp |
| 270 | (concat "\\([bct]\\)" mh-scan-date-regexp " *\\(..................\\)") | 307 | (concat "\\([bct]\\)" mh-scan-date-regexp " *\\(..................\\)") |
| 271 | "This regular expression matches the output of scan. | 308 | "This regular expression matches the output of scan. |
| 272 | Note that the default setting of `mh-folder-font-lock-keywords' expects this | 309 | |
| 273 | expression to contain at least three parenthesized expressions. The first | 310 | Note that the default setting of `mh-folder-font-lock-keywords' |
| 274 | should match the fontification hint (see `mh-scan-format-nmh'), the second is | 311 | expects this expression to contain at least three parenthesized |
| 275 | found in `mh-scan-date-regexp', and the third should match the user name as in | 312 | expressions. The first should match the fontification hint (see |
| 276 | the default of \"(concat \"\\\\([bct]\\\\)\" mh-scan-date-regexp | 313 | `mh-scan-format-nmh'), the second is found in |
| 277 | \"*\\\\(..................\\\\)\")\". | 314 | `mh-scan-date-regexp', and the third should match the user name |
| 278 | If this regular expression is not correct, the notation hints and the sender | 315 | as in the default of |
| 279 | will not be highlighted.") | 316 | |
| 317 | \"(concat \"\\\\([bct]\\\\)\" mh-scan-date-regexp | ||
| 318 | \"*\\\\(..................\\\\)\")\". | ||
| 319 | |||
| 320 | If this regular expression is not correct, the notation hints and | ||
| 321 | the sender will not be highlighted.") | ||
| 280 | 322 | ||
| 281 | 323 | ||
| 282 | 324 | ||
| @@ -313,22 +355,27 @@ will not be highlighted.") | |||
| 313 | 355 | ||
| 314 | (defvar mh-scan-cmd-note-width 1 | 356 | (defvar mh-scan-cmd-note-width 1 |
| 315 | "Number of columns consumed by the cmd-note field in `mh-scan-format'. | 357 | "Number of columns consumed by the cmd-note field in `mh-scan-format'. |
| 316 | This column will have one of the values: ` ', `D', `^', `+' and where | 358 | |
| 317 | ` ' is the default value, | 359 | This column will have one of the values: ` ', `D', `^', `+' and |
| 318 | `D' is the `mh-note-deleted' character, | 360 | where ` ' is the default value, |
| 319 | `^' is the `mh-note-refiled' character, and | 361 | |
| 320 | `+' is the `mh-note-cur' character.") | 362 | `D' is the `mh-note-deleted' character, |
| 363 | `^' is the `mh-note-refiled' character, and | ||
| 364 | `+' is the `mh-note-cur' character.") | ||
| 321 | 365 | ||
| 322 | (defvar mh-scan-destination-width 1 | 366 | (defvar mh-scan-destination-width 1 |
| 323 | "Number of columns consumed by the destination field in `mh-scan-format'. | 367 | "Number of columns consumed by the destination field in `mh-scan-format'. |
| 324 | This column will have one of ' ', '%', '-', 't', 'c', 'b', or `n' in it. | 368 | |
| 325 | A ' ' blank space is the default character. | 369 | This column will have one of ' ', '%', '-', 't', 'c', 'b', or `n' |
| 326 | A '%' indicates that the message in in a named MH sequence. | 370 | in it. |
| 327 | A '-' indicates that the message has been annotated with a replied field. | 371 | |
| 328 | A 't' indicates that the message contains mymbox in the To: field. | 372 | ' ' blank space is the default character. |
| 329 | A 'c' indicates that the message contains mymbox in the Cc: field. | 373 | '%' indicates that the message in in a named MH sequence. |
| 330 | A 'b' indicates that the message contains mymbox in the Bcc: field. | 374 | '-' indicates that the message has been annotated with a replied field. |
| 331 | A 'n' indicates that the message contains a Newsgroups: field.") | 375 | 't' indicates that the message contains mymbox in the To: field. |
| 376 | 'c' indicates that the message contains mymbox in the Cc: field. | ||
| 377 | 'b' indicates that the message contains mymbox in the Bcc: field. | ||
| 378 | 'n' indicates that the message contains a Newsgroups: field.") | ||
| 332 | 379 | ||
| 333 | (defvar mh-scan-date-width 5 | 380 | (defvar mh-scan-date-width 5 |
| 334 | "Number of columns consumed by the date field in `mh-scan-format'. | 381 | "Number of columns consumed by the date field in `mh-scan-format'. |
| @@ -336,7 +383,8 @@ This column will typically be of the form mm/dd.") | |||
| 336 | 383 | ||
| 337 | (defvar mh-scan-date-flag-width 1 | 384 | (defvar mh-scan-date-flag-width 1 |
| 338 | "Number of columns consumed to flag (in)valid dates in `mh-scan-format'. | 385 | "Number of columns consumed to flag (in)valid dates in `mh-scan-format'. |
| 339 | This column will have ` ' for valid and `*' for invalid or missing dates.") | 386 | This column will have ` ' for valid and `*' for invalid or |
| 387 | missing dates.") | ||
| 340 | 388 | ||
| 341 | (defvar mh-scan-from-mbox-width 17 | 389 | (defvar mh-scan-from-mbox-width 17 |
| 342 | "Number of columns consumed with the \"From:\" line in `mh-scan-format'. | 390 | "Number of columns consumed with the \"From:\" line in `mh-scan-format'. |
| @@ -388,17 +436,17 @@ This column will only ever have spaces in it.") | |||
| 388 | 436 | ||
| 389 | (defmacro mh-generate-sequence-font-lock (seq prefix face) | 437 | (defmacro mh-generate-sequence-font-lock (seq prefix face) |
| 390 | "Generate the appropriate code to fontify messages in SEQ. | 438 | "Generate the appropriate code to fontify messages in SEQ. |
| 391 | PREFIX is used to generate unique names for the variables and functions | 439 | PREFIX is used to generate unique names for the variables and |
| 392 | defined by the macro. So a different prefix should be provided for every | 440 | functions defined by the macro. So a different prefix should be |
| 393 | invocation. | 441 | provided for every invocation. |
| 394 | FACE is the font-lock face used to display the matching scan lines." | 442 | FACE is the font-lock face used to display the matching scan lines." |
| 395 | (let ((cache (intern (format "mh-folder-%s-seq-cache" prefix))) | 443 | (let ((cache (intern (format "mh-folder-%s-seq-cache" prefix))) |
| 396 | (func (intern (format "mh-folder-font-lock-%s" prefix)))) | 444 | (func (intern (format "mh-folder-font-lock-%s" prefix)))) |
| 397 | `(progn | 445 | `(progn |
| 398 | (defvar ,cache nil | 446 | (defvar ,cache nil |
| 399 | "Internal cache variable used for font-lock in MH-E. | 447 | "Internal cache variable used for font-lock in MH-E. |
| 400 | Should only be non-nil through font-lock stepping, and nil once font-lock | 448 | Should only be non-nil through font-lock stepping, and nil once |
| 401 | is done highlighting.") | 449 | font-lock is done highlighting.") |
| 402 | (make-variable-buffer-local ',cache) | 450 | (make-variable-buffer-local ',cache) |
| 403 | 451 | ||
| 404 | (defun ,func (limit) | 452 | (defun ,func (limit) |
| @@ -463,16 +511,19 @@ is done highlighting.") | |||
| 463 | 511 | ||
| 464 | (defvar mh-delete-list nil | 512 | (defvar mh-delete-list nil |
| 465 | "List of message numbers to delete. | 513 | "List of message numbers to delete. |
| 466 | This variable can be used by `mh-before-commands-processed-hook'.") | 514 | This variable can be used by |
| 515 | `mh-before-commands-processed-hook'.") | ||
| 467 | 516 | ||
| 468 | (defvar mh-refile-list nil | 517 | (defvar mh-refile-list nil |
| 469 | "List of folder names in `mh-seq-list'. | 518 | "List of folder names in `mh-seq-list'. |
| 470 | This variable can be used by `mh-before-commands-processed-hook'.") | 519 | This variable can be used by |
| 520 | `mh-before-commands-processed-hook'.") | ||
| 471 | 521 | ||
| 472 | (defvar mh-folders-changed nil | 522 | (defvar mh-folders-changed nil |
| 473 | "Lists which folders were affected by deletes and refiles. | 523 | "Lists which folders were affected by deletes and refiles. |
| 474 | This list will always include the current folder `mh-current-folder'. | 524 | This list will always include the current folder |
| 475 | This variable can be used by `mh-before-commands-processed-hook'.") | 525 | `mh-current-folder'. This variable can be used by |
| 526 | `mh-before-commands-processed-hook'.") | ||
| 476 | 527 | ||
| 477 | (defvar mh-next-direction 'forward | 528 | (defvar mh-next-direction 'forward |
| 478 | "Direction to move to next message.") | 529 | "Direction to move to next message.") |
| @@ -534,9 +585,11 @@ These operations include narrowing or threading.") | |||
| 534 | 585 | ||
| 535 | ;;;###autoload | 586 | ;;;###autoload |
| 536 | (defun mh-rmail (&optional arg) | 587 | (defun mh-rmail (&optional arg) |
| 537 | "Inc(orporate) new mail with MH. | 588 | "Incorporate new mail with MH. |
| 538 | Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E, | 589 | Scan an MH folder if ARG is non-nil. |
| 539 | the Emacs interface to the MH mail system." | 590 | |
| 591 | This function is an entry point to MH-E, the Emacs interface to | ||
| 592 | the MH mail system." | ||
| 540 | (interactive "P") | 593 | (interactive "P") |
| 541 | (mh-find-path) | 594 | (mh-find-path) |
| 542 | (if arg | 595 | (if arg |
| @@ -548,8 +601,10 @@ the Emacs interface to the MH mail system." | |||
| 548 | ;;;###autoload | 601 | ;;;###autoload |
| 549 | (defun mh-nmail (&optional arg) | 602 | (defun mh-nmail (&optional arg) |
| 550 | "Check for new mail in inbox folder. | 603 | "Check for new mail in inbox folder. |
| 551 | Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E, | 604 | Scan an MH folder if ARG is non-nil. |
| 552 | the Emacs interface to the MH mail system." | 605 | |
| 606 | This function is an entry point to MH-E, the Emacs interface to | ||
| 607 | the MH mail system." | ||
| 553 | (interactive "P") | 608 | (interactive "P") |
| 554 | (mh-find-path) ; init mh-inbox | 609 | (mh-find-path) ; init mh-inbox |
| 555 | (if arg | 610 | (if arg |
| @@ -563,20 +618,21 @@ the Emacs interface to the MH mail system." | |||
| 563 | (defun mh-delete-msg (range) | 618 | (defun mh-delete-msg (range) |
| 564 | "Delete RANGE\\<mh-folder-mode-map>. | 619 | "Delete RANGE\\<mh-folder-mode-map>. |
| 565 | 620 | ||
| 566 | To mark a message for deletion, use this command. A \"D\" is placed by the | 621 | To mark a message for deletion, use this command. A \"D\" is |
| 567 | message in the scan window, and the next undeleted message is displayed. If | 622 | placed by the message in the scan window, and the next undeleted |
| 568 | the previous command had been \\[mh-previous-undeleted-msg], then the next | 623 | message is displayed. If the previous command had been |
| 569 | message displayed is the first undeleted message previous to the message just | 624 | \\[mh-previous-undeleted-msg], then the next message displayed is |
| 570 | deleted. Use \\[mh-next-undeleted-msg] to force subsequent \\[mh-delete-msg] | 625 | the first undeleted message previous to the message just deleted. |
| 571 | commands to move forward to the next undeleted message after deleting the | 626 | Use \\[mh-next-undeleted-msg] to force subsequent |
| 572 | message under the cursor. | 627 | \\[mh-delete-msg] commands to move forward to the next undeleted |
| 573 | 628 | message after deleting the message under the cursor. | |
| 574 | The hook `mh-delete-msg-hook' is called after you mark a message for deletion. | 629 | |
| 575 | For example, a past maintainer of MH-E used this once when he kept statistics | 630 | The hook `mh-delete-msg-hook' is called after you mark a message |
| 576 | on his mail usage. | 631 | for deletion. For example, a past maintainer of MH-E used this |
| 577 | 632 | once when he kept statistics on his mail usage. | |
| 578 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 633 | |
| 579 | interactive use." | 634 | Check the documentation of `mh-interactive-range' to see how |
| 635 | RANGE is read in interactive use." | ||
| 580 | (interactive (list (mh-interactive-range "Delete"))) | 636 | (interactive (list (mh-interactive-range "Delete"))) |
| 581 | (mh-delete-msg-no-motion range) | 637 | (mh-delete-msg-no-motion range) |
| 582 | (if (looking-at mh-scan-deleted-msg-regexp) | 638 | (if (looking-at mh-scan-deleted-msg-regexp) |
| @@ -585,11 +641,12 @@ interactive use." | |||
| 585 | (defun mh-delete-msg-no-motion (range) | 641 | (defun mh-delete-msg-no-motion (range) |
| 586 | "Delete RANGE, don't move to next message. | 642 | "Delete RANGE, don't move to next message. |
| 587 | 643 | ||
| 588 | This command marks the RANGE for deletion but leaves the cursor at the current | 644 | This command marks the RANGE for deletion but leaves the cursor |
| 589 | message in case you wish to perform other operations on the message. | 645 | at the current message in case you wish to perform other |
| 646 | operations on the message. | ||
| 590 | 647 | ||
| 591 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 648 | Check the documentation of `mh-interactive-range' to see how |
| 592 | interactive use." | 649 | RANGE is read in interactive use." |
| 593 | (interactive (list (mh-interactive-range "Delete"))) | 650 | (interactive (list (mh-interactive-range "Delete"))) |
| 594 | (mh-iterate-on-range () range | 651 | (mh-iterate-on-range () range |
| 595 | (mh-delete-a-msg nil))) | 652 | (mh-delete-a-msg nil))) |
| @@ -597,16 +654,17 @@ interactive use." | |||
| 597 | (defun mh-execute-commands () | 654 | (defun mh-execute-commands () |
| 598 | "Process outstanding delete and refile requests\\<mh-folder-mode-map>. | 655 | "Process outstanding delete and refile requests\\<mh-folder-mode-map>. |
| 599 | 656 | ||
| 600 | If you've marked messages to be deleted or refiled and you want to go ahead | 657 | If you've marked messages to be deleted or refiled and you want |
| 601 | and delete or refile the messages, use this command. Many MH-E commands that | 658 | to go ahead and delete or refile the messages, use this command. |
| 602 | may affect the numbering of the messages (such as \\[mh-rescan-folder] or | 659 | Many MH-E commands that may affect the numbering of the |
| 603 | \\[mh-pack-folder]) will ask if you want to process refiles or deletes first | 660 | messages (such as \\[mh-rescan-folder] or \\[mh-pack-folder]) |
| 604 | and then either run this command for you or undo the pending refiles and | 661 | will ask if you want to process refiles or deletes first and then |
| 662 | either run this command for you or undo the pending refiles and | ||
| 605 | deletes, which are lost. | 663 | deletes, which are lost. |
| 606 | 664 | ||
| 607 | This function runs `mh-before-commands-processed-hook' before the commands are | 665 | This function runs `mh-before-commands-processed-hook' before the |
| 608 | processed and `mh-after-commands-processed-hook' after the commands are | 666 | commands are processed and `mh-after-commands-processed-hook' |
| 609 | processed." | 667 | after the commands are processed." |
| 610 | (interactive) | 668 | (interactive) |
| 611 | (if mh-folder-view-stack (mh-widen t)) | 669 | (if mh-folder-view-stack (mh-widen t)) |
| 612 | (mh-process-commands mh-current-folder) | 670 | (mh-process-commands mh-current-folder) |
| @@ -643,15 +701,17 @@ Use the command \\[mh-show] to show the message normally again." | |||
| 643 | "Incorporate new mail into a folder. | 701 | "Incorporate new mail into a folder. |
| 644 | 702 | ||
| 645 | You can incorporate mail from any file into the current folder by | 703 | You can incorporate mail from any file into the current folder by |
| 646 | specifying a prefix argument; you'll be prompted for the name of the | 704 | specifying a prefix argument; you'll be prompted for the name of |
| 647 | file to use as well as the destination folder | 705 | the file to use as well as the destination folder |
| 648 | 706 | ||
| 649 | The hook `mh-inc-folder-hook' is run after incorporating new mail. Do | 707 | The hook `mh-inc-folder-hook' is run after incorporating new |
| 650 | not call this function from outside MH-E; use \\[mh-rmail] instead. | 708 | mail. Do not call this function from outside MH-E; use |
| 709 | \\[mh-rmail] instead. | ||
| 651 | 710 | ||
| 652 | In a program optional argument MAILDROP-NAME specifies an alternate | 711 | In a program optional argument MAILDROP-NAME specifies an |
| 653 | maildrop from the default. The optional argument FOLDER specifies | 712 | alternate maildrop from the default. The optional argument FOLDER |
| 654 | where to incorporate mail instead of the default named by `mh-inbox'." | 713 | specifies where to incorporate mail instead of the default named |
| 714 | by `mh-inbox'." | ||
| 655 | (interactive (list (if current-prefix-arg | 715 | (interactive (list (if current-prefix-arg |
| 656 | (expand-file-name | 716 | (expand-file-name |
| 657 | (read-file-name "inc mail from file: " | 717 | (read-file-name "inc mail from file: " |
| @@ -695,12 +755,12 @@ where to incorporate mail instead of the default named by `mh-inbox'." | |||
| 695 | (defun mh-next-undeleted-msg (&optional count wait-after-complaining-flag) | 755 | (defun mh-next-undeleted-msg (&optional count wait-after-complaining-flag) |
| 696 | "Display next message. | 756 | "Display next message. |
| 697 | 757 | ||
| 698 | This command can be given a prefix argument COUNT to specify how many unread | 758 | This command can be given a prefix argument COUNT to specify how |
| 699 | messages to skip. | 759 | many unread messages to skip. |
| 700 | 760 | ||
| 701 | In a program, pause for a second after printing message if we are at the last | 761 | In a program, pause for a second after printing message if we are |
| 702 | undeleted message and optional argument WAIT-AFTER-COMPLAINING-FLAG is | 762 | at the last undeleted message and optional argument |
| 703 | non-nil." | 763 | WAIT-AFTER-COMPLAINING-FLAG is non-nil." |
| 704 | (interactive "p") | 764 | (interactive "p") |
| 705 | (setq mh-next-direction 'forward) | 765 | (setq mh-next-direction 'forward) |
| 706 | (forward-line 1) | 766 | (forward-line 1) |
| @@ -716,18 +776,19 @@ non-nil." | |||
| 716 | 776 | ||
| 717 | The name of the folder is derived as follows: | 777 | The name of the folder is derived as follows: |
| 718 | 778 | ||
| 719 | a) The folder name associated with the first address found in the list | 779 | a) The folder name associated with the first address found in |
| 720 | `mh-default-folder-list' is used. Each element in this list contains a | 780 | the list `mh-default-folder-list' is used. Each element in |
| 721 | `Check Recipient' item. If this item is turned on, then the address is | 781 | this list contains a `Check Recipient' item. If this item is |
| 722 | checked against the recipient instead of the sender. This is useful for | 782 | turned on, then the address is checked against the recipient |
| 723 | mailing lists. | 783 | instead of the sender. This is useful for mailing lists. |
| 724 | 784 | ||
| 725 | b) An alias prefixed by `mh-default-folder-prefix' corresponding to the | 785 | b) An alias prefixed by `mh-default-folder-prefix' |
| 726 | address is used. The prefix is used to prevent clutter in your mail | 786 | corresponding to the address is used. The prefix is used to |
| 727 | directory. | 787 | prevent clutter in your mail directory. |
| 728 | 788 | ||
| 729 | Return nil if a folder name was not derived, or if the variable | 789 | Return nil if a folder name was not derived, or if the variable |
| 730 | `mh-default-folder-must-exist-flag' is t and the folder does not exist." | 790 | `mh-default-folder-must-exist-flag' is t and the folder does not |
| 791 | exist." | ||
| 731 | ;; Loop for all entries in mh-default-folder-list | 792 | ;; Loop for all entries in mh-default-folder-list |
| 732 | (save-restriction | 793 | (save-restriction |
| 733 | (goto-char (point-min)) | 794 | (goto-char (point-min)) |
| @@ -792,15 +853,15 @@ The default folder name is generated by the option | |||
| 792 | (defun mh-refile-msg (range folder &optional dont-update-last-destination-flag) | 853 | (defun mh-refile-msg (range folder &optional dont-update-last-destination-flag) |
| 793 | "Refile (output) RANGE into FOLDER. | 854 | "Refile (output) RANGE into FOLDER. |
| 794 | 855 | ||
| 795 | You are prompted for the folder name. Note that this command can also be used | 856 | You are prompted for the folder name. Note that this command can also |
| 796 | to create folders. If you specify a folder that does not exist, you will be | 857 | be used to create folders. If you specify a folder that does not |
| 797 | prompted to create it. | 858 | exist, you will be prompted to create it. |
| 798 | 859 | ||
| 799 | The hook `mh-refile-msg-hook' is called after a message is marked to be | 860 | The hook `mh-refile-msg-hook' is called after a message is marked to |
| 800 | refiled. | 861 | be refiled. |
| 801 | 862 | ||
| 802 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 863 | Check the documentation of `mh-interactive-range' to see how RANGE is |
| 803 | interactive use. | 864 | read in interactive use. |
| 804 | 865 | ||
| 805 | In a program, the variables `mh-last-destination' and | 866 | In a program, the variables `mh-last-destination' and |
| 806 | `mh-last-destination-folder' are not updated if | 867 | `mh-last-destination-folder' are not updated if |
| @@ -817,14 +878,14 @@ DONT-UPDATE-LAST-DESTINATION-FLAG is non-nil." | |||
| 817 | (defun mh-refile-or-write-again (range &optional interactive-flag) | 878 | (defun mh-refile-or-write-again (range &optional interactive-flag) |
| 818 | "Repeat last output command. | 879 | "Repeat last output command. |
| 819 | 880 | ||
| 820 | If you are refiling several messages into the same folder, you can use this | 881 | If you are refiling several messages into the same folder, you can use |
| 821 | command to repeat the last refile or write. You can use a range. | 882 | this command to repeat the last refile or write. You can use a range. |
| 822 | 883 | ||
| 823 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 884 | Check the documentation of `mh-interactive-range' to see how RANGE is |
| 824 | interactive use. | 885 | read in interactive use. |
| 825 | 886 | ||
| 826 | In a program, a non-nil INTERACTIVE-FLAG means that the function was called | 887 | In a program, a non-nil INTERACTIVE-FLAG means that the function was |
| 827 | interactively." | 888 | called interactively." |
| 828 | (interactive (list (mh-interactive-range "Redo") t)) | 889 | (interactive (list (mh-interactive-range "Redo") t)) |
| 829 | (if (null mh-last-destination) | 890 | (if (null mh-last-destination) |
| 830 | (error "No previous refile or write")) | 891 | (error "No previous refile or write")) |
| @@ -840,18 +901,20 @@ interactively." | |||
| 840 | (defun mh-quit () | 901 | (defun mh-quit () |
| 841 | "Quit the current MH-E folder. | 902 | "Quit the current MH-E folder. |
| 842 | 903 | ||
| 843 | When you want to quit using MH-E and go back to editing, you can use this | 904 | When you want to quit using MH-E and go back to editing, you can use |
| 844 | command. This buries the buffers of the current MH-E folder and restores the | 905 | this command. This buries the buffers of the current MH-E folder and |
| 845 | buffers that were present when you first ran \\[mh-rmail]. It also removes any | 906 | restores the buffers that were present when you first ran |
| 846 | MH-E working buffers whose name begins with \" *mh-\" or \"*MH-E \". You can | 907 | \\[mh-rmail]. It also removes any MH-E working buffers whose name |
| 847 | later restore your MH-E session by selecting the \"+inbox\" buffer or by | 908 | begins with \" *mh-\" or \"*MH-E \". You can later restore your MH-E |
| 848 | running \\[mh-rmail] again. | 909 | session by selecting the \"+inbox\" buffer or by running \\[mh-rmail] |
| 849 | 910 | again. | |
| 850 | The two hooks `mh-before-quit-hook' and `mh-quit-hook' are called by this | 911 | |
| 851 | function. The former one is called before the quit occurs, so you might use it | 912 | The two hooks `mh-before-quit-hook' and `mh-quit-hook' are called by |
| 852 | to perform any MH-E operations; you could perform some query and abort the | 913 | this function. The former one is called before the quit occurs, so you |
| 853 | quit or call `mh-execute-commands', for example. The latter is not run in an | 914 | might use it to perform any MH-E operations; you could perform some |
| 854 | MH-E context, so you might use it to modify the window setup." | 915 | query and abort the quit or call `mh-execute-commands', for example. |
| 916 | The latter is not run in an MH-E context, so you might use it to | ||
| 917 | modify the window setup." | ||
| 855 | (interactive) | 918 | (interactive) |
| 856 | (run-hooks 'mh-before-quit-hook) | 919 | (run-hooks 'mh-before-quit-hook) |
| 857 | (let ((show-buffer (get-buffer mh-show-buffer))) | 920 | (let ((show-buffer (get-buffer mh-show-buffer))) |
| @@ -874,9 +937,9 @@ MH-E context, so you might use it to modify the window setup." | |||
| 874 | (defun mh-page-msg (&optional lines) | 937 | (defun mh-page-msg (&optional lines) |
| 875 | "Display next page in message. | 938 | "Display next page in message. |
| 876 | 939 | ||
| 877 | You can give this command a prefix argument that specifies the number of LINES | 940 | You can give this command a prefix argument that specifies the |
| 878 | to scroll. This command will also show the next undeleted message if it is | 941 | number of LINES to scroll. This command will also show the next |
| 879 | used at the bottom of a message." | 942 | undeleted message if it is used at the bottom of a message." |
| 880 | (interactive "P") | 943 | (interactive "P") |
| 881 | (if mh-showing-mode | 944 | (if mh-showing-mode |
| 882 | (if mh-page-to-next-msg-flag | 945 | (if mh-page-to-next-msg-flag |
| @@ -899,8 +962,8 @@ used at the bottom of a message." | |||
| 899 | (defun mh-previous-page (&optional lines) | 962 | (defun mh-previous-page (&optional lines) |
| 900 | "Display next page in message. | 963 | "Display next page in message. |
| 901 | 964 | ||
| 902 | You can give this command a prefix argument that specifies the number of LINES | 965 | You can give this command a prefix argument that specifies the |
| 903 | to scroll." | 966 | number of LINES to scroll." |
| 904 | (interactive "P") | 967 | (interactive "P") |
| 905 | (mh-in-show-buffer (mh-show-buffer) | 968 | (mh-in-show-buffer (mh-show-buffer) |
| 906 | (scroll-down lines))) | 969 | (scroll-down lines))) |
| @@ -908,12 +971,12 @@ to scroll." | |||
| 908 | (defun mh-previous-undeleted-msg (&optional count wait-after-complaining-flag) | 971 | (defun mh-previous-undeleted-msg (&optional count wait-after-complaining-flag) |
| 909 | "Display previous message. | 972 | "Display previous message. |
| 910 | 973 | ||
| 911 | This command can be given a prefix argument COUNT to specify how many unread | 974 | This command can be given a prefix argument COUNT to specify how |
| 912 | messages to skip. | 975 | many unread messages to skip. |
| 913 | 976 | ||
| 914 | In a program, pause for a second after printing message if we are at the last | 977 | In a program, pause for a second after printing message if we are |
| 915 | undeleted message and optional argument WAIT-AFTER-COMPLAINING-FLAG is | 978 | at the last undeleted message and optional argument |
| 916 | non-nil." | 979 | WAIT-AFTER-COMPLAINING-FLAG is non-nil." |
| 917 | (interactive "p") | 980 | (interactive "p") |
| 918 | (setq mh-next-direction 'backward) | 981 | (setq mh-next-direction 'backward) |
| 919 | (beginning-of-line) | 982 | (beginning-of-line) |
| @@ -925,8 +988,8 @@ non-nil." | |||
| 925 | (defun mh-previous-unread-msg (&optional count) | 988 | (defun mh-previous-unread-msg (&optional count) |
| 926 | "Display previous unread message. | 989 | "Display previous unread message. |
| 927 | 990 | ||
| 928 | This command can be given a prefix argument COUNT to specify how many unread | 991 | This command can be given a prefix argument COUNT to specify how |
| 929 | messages to skip." | 992 | many unread messages to skip." |
| 930 | (interactive "p") | 993 | (interactive "p") |
| 931 | (unless (> count 0) | 994 | (unless (> count 0) |
| 932 | (error "The function mh-previous-unread-msg expects positive argument")) | 995 | (error "The function mh-previous-unread-msg expects positive argument")) |
| @@ -958,9 +1021,11 @@ messages to skip." | |||
| 958 | 1021 | ||
| 959 | (defun mh-goto-next-button (backward-flag &optional criterion) | 1022 | (defun mh-goto-next-button (backward-flag &optional criterion) |
| 960 | "Search for next button satisfying criterion. | 1023 | "Search for next button satisfying criterion. |
| 961 | If BACKWARD-FLAG is non-nil search backward in the buffer for a mime button. If | 1024 | |
| 962 | CRITERION is a function or a symbol which has a function binding then that | 1025 | If BACKWARD-FLAG is non-nil search backward in the buffer for a mime |
| 963 | function must return non-nil at the button we stop." | 1026 | button. |
| 1027 | If CRITERION is a function or a symbol which has a function binding | ||
| 1028 | then that function must return non-nil at the button we stop." | ||
| 964 | (unless (or (and (symbolp criterion) (fboundp criterion)) | 1029 | (unless (or (and (symbolp criterion) (fboundp criterion)) |
| 965 | (functionp criterion)) | 1030 | (functionp criterion)) |
| 966 | (setq criterion (lambda (x) t))) | 1031 | (setq criterion (lambda (x) t))) |
| @@ -1003,11 +1068,11 @@ function must return non-nil at the button we stop." | |||
| 1003 | (defun mh-next-button (&optional backward-flag) | 1068 | (defun mh-next-button (&optional backward-flag) |
| 1004 | "Go to the next button. | 1069 | "Go to the next button. |
| 1005 | 1070 | ||
| 1006 | If the end of the buffer is reached then the search wraps over to the start of | 1071 | If the end of the buffer is reached then the search wraps over to |
| 1007 | the buffer. | 1072 | the start of the buffer. |
| 1008 | 1073 | ||
| 1009 | If an optional prefix argument BACKWARD-FLAG is given, the cursor will move to | 1074 | If an optional prefix argument BACKWARD-FLAG is given, the cursor |
| 1010 | the previous button." | 1075 | will move to the previous button." |
| 1011 | (interactive (list current-prefix-arg)) | 1076 | (interactive (list current-prefix-arg)) |
| 1012 | (unless mh-showing-mode | 1077 | (unless mh-showing-mode |
| 1013 | (mh-show)) | 1078 | (mh-show)) |
| @@ -1017,17 +1082,18 @@ the previous button." | |||
| 1017 | (defun mh-prev-button () | 1082 | (defun mh-prev-button () |
| 1018 | "Go to the previous button. | 1083 | "Go to the previous button. |
| 1019 | 1084 | ||
| 1020 | If the beginning of the buffer is reached then the search wraps over to the | 1085 | If the beginning of the buffer is reached then the search wraps |
| 1021 | end of the buffer." | 1086 | over to the end of the buffer." |
| 1022 | (interactive) | 1087 | (interactive) |
| 1023 | (mh-next-button t)) | 1088 | (mh-next-button t)) |
| 1024 | 1089 | ||
| 1025 | (defun mh-folder-mime-action (part-index action include-security-flag) | 1090 | (defun mh-folder-mime-action (part-index action include-security-flag) |
| 1026 | "Go to PART-INDEX and carry out ACTION. | 1091 | "Go to PART-INDEX and carry out ACTION. |
| 1027 | If PART-INDEX is nil then go to the next part in the buffer. The search for | 1092 | |
| 1028 | the next buffer wraps around if end of buffer is reached. If argument | 1093 | If PART-INDEX is nil then go to the next part in the buffer. The |
| 1029 | INCLUDE-SECURITY-FLAG is non-nil then include security info buttons when | 1094 | search for the next buffer wraps around if end of buffer is reached. |
| 1030 | searching for a suitable parts." | 1095 | If argument INCLUDE-SECURITY-FLAG is non-nil then include security |
| 1096 | info buttons when searching for a suitable parts." | ||
| 1031 | (unless mh-showing-mode | 1097 | (unless mh-showing-mode |
| 1032 | (mh-show)) | 1098 | (mh-show)) |
| 1033 | (mh-in-show-buffer (mh-show-buffer) | 1099 | (mh-in-show-buffer (mh-show-buffer) |
| @@ -1058,15 +1124,17 @@ searching for a suitable parts." | |||
| 1058 | (defun mh-folder-toggle-mime-part (part-index) | 1124 | (defun mh-folder-toggle-mime-part (part-index) |
| 1059 | "View attachment. | 1125 | "View attachment. |
| 1060 | 1126 | ||
| 1061 | This command displays (or hides) the attachment associated with the button | 1127 | This command displays (or hides) the attachment associated with |
| 1062 | under the cursor. If the cursor is not located over a button, then the cursor | 1128 | the button under the cursor. If the cursor is not located over a |
| 1063 | first moves to the next button, wrapping to the beginning of the message if | 1129 | button, then the cursor first moves to the next button, wrapping |
| 1064 | necessary. This command has the advantage over related commands of working | 1130 | to the beginning of the message if necessary. This command has |
| 1065 | from the MH-Folder buffer. | 1131 | the advantage over related commands of working from the MH-Folder |
| 1066 | 1132 | buffer. | |
| 1067 | You can also provide a numeric prefix argument PART-INDEX to view the | 1133 | |
| 1068 | attachment labeled with that number. If Emacs does not know how to display the | 1134 | You can also provide a numeric prefix argument PART-INDEX to view |
| 1069 | attachment, then Emacs offers to save the attachment in a file." | 1135 | the attachment labeled with that number. If Emacs does not know |
| 1136 | how to display the attachment, then Emacs offers to save the | ||
| 1137 | attachment in a file." | ||
| 1070 | (interactive "P") | 1138 | (interactive "P") |
| 1071 | (when (consp part-index) (setq part-index (car part-index))) | 1139 | (when (consp part-index) (setq part-index (car part-index))) |
| 1072 | (mh-folder-mime-action part-index #'mh-press-button t)) | 1140 | (mh-folder-mime-action part-index #'mh-press-button t)) |
| @@ -1074,14 +1142,15 @@ attachment, then Emacs offers to save the attachment in a file." | |||
| 1074 | (defun mh-folder-inline-mime-part (part-index) | 1142 | (defun mh-folder-inline-mime-part (part-index) |
| 1075 | "Show attachment verbatim. | 1143 | "Show attachment verbatim. |
| 1076 | 1144 | ||
| 1077 | You can view the raw contents of an attachment with this command. This command | 1145 | You can view the raw contents of an attachment with this command. |
| 1078 | displays (or hides) the contents of the attachment associated with the button | 1146 | This command displays (or hides) the contents of the attachment |
| 1079 | under the cursor verbatim. If the cursor is not located over a button, then | 1147 | associated with the button under the cursor verbatim. If the |
| 1080 | the cursor first moves to the next button, wrapping to the beginning of the | 1148 | cursor is not located over a button, then the cursor first moves |
| 1081 | message if necessary. | 1149 | to the next button, wrapping to the beginning of the message if |
| 1150 | necessary. | ||
| 1082 | 1151 | ||
| 1083 | You can also provide a numeric prefix argument PART-INDEX to view the | 1152 | You can also provide a numeric prefix argument PART-INDEX to view |
| 1084 | attachment labeled with that number." | 1153 | the attachment labeled with that number." |
| 1085 | (interactive "P") | 1154 | (interactive "P") |
| 1086 | (when (consp part-index) (setq part-index (car part-index))) | 1155 | (when (consp part-index) (setq part-index (car part-index))) |
| 1087 | (mh-folder-mime-action part-index #'mh-mime-inline-part nil)) | 1156 | (mh-folder-mime-action part-index #'mh-mime-inline-part nil)) |
| @@ -1089,15 +1158,16 @@ attachment labeled with that number." | |||
| 1089 | (defun mh-folder-save-mime-part (part-index) | 1158 | (defun mh-folder-save-mime-part (part-index) |
| 1090 | "Save (output) attachment. | 1159 | "Save (output) attachment. |
| 1091 | 1160 | ||
| 1092 | This command saves the attachment associated with the button under the cursor. | 1161 | This command saves the attachment associated with the button under the |
| 1093 | If the cursor is not located over a button, then the cursor first moves to the | 1162 | cursor. If the cursor is not located over a button, then the cursor |
| 1094 | next button, wrapping to the beginning of the message if necessary. | 1163 | first moves to the next button, wrapping to the beginning of the |
| 1164 | message if necessary. | ||
| 1095 | 1165 | ||
| 1096 | You can also provide a numeric prefix argument PART-INDEX to save the | 1166 | You can also provide a numeric prefix argument PART-INDEX to save the |
| 1097 | attachment labeled with that number. | 1167 | attachment labeled with that number. |
| 1098 | 1168 | ||
| 1099 | This command prompts you for a filename and suggests a specific name if it is | 1169 | This command prompts you for a filename and suggests a specific name |
| 1100 | available." | 1170 | if it is available." |
| 1101 | (interactive "P") | 1171 | (interactive "P") |
| 1102 | (when (consp part-index) (setq part-index (car part-index))) | 1172 | (when (consp part-index) (setq part-index (car part-index))) |
| 1103 | (mh-folder-mime-action part-index #'mh-mime-save-part nil)) | 1173 | (mh-folder-mime-action part-index #'mh-mime-save-part nil)) |
| @@ -1116,16 +1186,17 @@ Also removes all content from the folder buffer." | |||
| 1116 | "Rescan folder\\<mh-folder-mode-map>. | 1186 | "Rescan folder\\<mh-folder-mode-map>. |
| 1117 | 1187 | ||
| 1118 | This command is useful to grab all messages in your \"+inbox\" after | 1188 | This command is useful to grab all messages in your \"+inbox\" after |
| 1119 | processing your new mail for the first time. If you don't want to rescan the | 1189 | processing your new mail for the first time. If you don't want to |
| 1120 | entire folder, this command will accept a RANGE. Check the documentation of | 1190 | rescan the entire folder, this command will accept a RANGE. Check the |
| 1121 | `mh-interactive-range' to see how RANGE is read in interactive use. | 1191 | documentation of `mh-interactive-range' to see how RANGE is read in |
| 1192 | interactive use. | ||
| 1122 | 1193 | ||
| 1123 | This command will ask if you want to process refiles or deletes first and then | 1194 | This command will ask if you want to process refiles or deletes first |
| 1124 | either run \\[mh-execute-commands] for you or undo the pending refiles and | 1195 | and then either run \\[mh-execute-commands] for you or undo the |
| 1125 | deletes, which are lost. | 1196 | pending refiles and deletes, which are lost. |
| 1126 | 1197 | ||
| 1127 | In a program, the processing of outstanding commands is not performed if | 1198 | In a program, the processing of outstanding commands is not performed |
| 1128 | DONT-EXEC-PENDING is non-nil." | 1199 | if DONT-EXEC-PENDING is non-nil." |
| 1129 | (interactive (list (if current-prefix-arg | 1200 | (interactive (list (if current-prefix-arg |
| 1130 | (mh-read-range "Rescan" mh-current-folder t nil t | 1201 | (mh-read-range "Rescan" mh-current-folder t nil t |
| 1131 | mh-interpret-number-as-range-flag) | 1202 | mh-interpret-number-as-range-flag) |
| @@ -1139,10 +1210,11 @@ DONT-EXEC-PENDING is non-nil." | |||
| 1139 | (defun mh-write-msg-to-file (message file no-header) | 1210 | (defun mh-write-msg-to-file (message file no-header) |
| 1140 | "Append MESSAGE to end of FILE\\<mh-folder-mode-map>. | 1211 | "Append MESSAGE to end of FILE\\<mh-folder-mode-map>. |
| 1141 | 1212 | ||
| 1142 | You are prompted for the filename. If the file already exists, the message is | 1213 | You are prompted for the filename. If the file already exists, |
| 1143 | appended to it. You can also write the message to the file without the header | 1214 | the message is appended to it. You can also write the message to |
| 1144 | by specifying a prefix argument NO-HEADER. Subsequent writes to the same file | 1215 | the file without the header by specifying a prefix argument |
| 1145 | can be made with the command \\[mh-refile-or-write-again]." | 1216 | NO-HEADER. Subsequent writes to the same file can be made with |
| 1217 | the command \\[mh-refile-or-write-again]." | ||
| 1146 | (interactive | 1218 | (interactive |
| 1147 | (list (mh-get-msg-num t) | 1219 | (list (mh-get-msg-num t) |
| 1148 | (let ((default-dir (if (eq 'write (car mh-last-destination-write)) | 1220 | (let ((default-dir (if (eq 'write (car mh-last-destination-write)) |
| @@ -1178,13 +1250,14 @@ can be made with the command \\[mh-refile-or-write-again]." | |||
| 1178 | (defun mh-undo (range) | 1250 | (defun mh-undo (range) |
| 1179 | "Undo pending deletes or refiles in RANGE. | 1251 | "Undo pending deletes or refiles in RANGE. |
| 1180 | 1252 | ||
| 1181 | If you've deleted a message or refiled it, but changed your mind, you can | 1253 | If you've deleted a message or refiled it, but changed your mind, |
| 1182 | cancel the action before you've executed it. Use this command to undo a refile | 1254 | you can cancel the action before you've executed it. Use this |
| 1183 | on or deletion of a single message. You can also undo refiles and deletes for | 1255 | command to undo a refile on or deletion of a single message. You |
| 1184 | messages that are found in a given RANGE. | 1256 | can also undo refiles and deletes for messages that are found in |
| 1257 | a given RANGE. | ||
| 1185 | 1258 | ||
| 1186 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 1259 | Check the documentation of `mh-interactive-range' to see how |
| 1187 | interactive use." | 1260 | RANGE is read in interactive use." |
| 1188 | (interactive (list (mh-interactive-range "Undo"))) | 1261 | (interactive (list (mh-interactive-range "Undo"))) |
| 1189 | (cond ((numberp range) | 1262 | (cond ((numberp range) |
| 1190 | (let ((original-position (point))) | 1263 | (let ((original-position (point))) |
| @@ -1210,8 +1283,8 @@ interactive use." | |||
| 1210 | 1283 | ||
| 1211 | (defun mh-folder-line-matches-show-buffer-p () | 1284 | (defun mh-folder-line-matches-show-buffer-p () |
| 1212 | "Return t if the message under point in folder-mode is in the show buffer. | 1285 | "Return t if the message under point in folder-mode is in the show buffer. |
| 1213 | Return nil in any other circumstance (no message under point, no show buffer, | 1286 | Return nil in any other circumstance (no message under point, no |
| 1214 | the message in the show buffer doesn't match." | 1287 | show buffer, the message in the show buffer doesn't match." |
| 1215 | (and (eq major-mode 'mh-folder-mode) | 1288 | (and (eq major-mode 'mh-folder-mode) |
| 1216 | (mh-get-msg-num nil) | 1289 | (mh-get-msg-num nil) |
| 1217 | mh-show-buffer | 1290 | mh-show-buffer |
| @@ -1227,9 +1300,9 @@ the message in the show buffer doesn't match." | |||
| 1227 | 1300 | ||
| 1228 | (defmacro mh-macro-expansion-time-gnus-version () | 1301 | (defmacro mh-macro-expansion-time-gnus-version () |
| 1229 | "Return Gnus version available at macro expansion time. | 1302 | "Return Gnus version available at macro expansion time. |
| 1230 | The macro evaluates the Gnus version at macro expansion time. If MH-E was | 1303 | The macro evaluates the Gnus version at macro expansion time. If |
| 1231 | compiled then macro expansion happens at compile time." | 1304 | MH-E was compiled then macro expansion happens at compile time." |
| 1232 | gnus-version) | 1305 | gnus-version) |
| 1233 | 1306 | ||
| 1234 | (defun mh-run-time-gnus-version () | 1307 | (defun mh-run-time-gnus-version () |
| 1235 | "Return Gnus version available at run time." | 1308 | "Return Gnus version available at run time." |
| @@ -1271,9 +1344,9 @@ compiled then macro expansion happens at compile time." | |||
| 1271 | 1344 | ||
| 1272 | (defun mh-parse-flist-output-line (line &optional current-folder) | 1345 | (defun mh-parse-flist-output-line (line &optional current-folder) |
| 1273 | "Parse LINE to generate folder name, unseen messages and total messages. | 1346 | "Parse LINE to generate folder name, unseen messages and total messages. |
| 1274 | If CURRENT-FOLDER is non-nil then it contains the current folder name and it is | 1347 | If CURRENT-FOLDER is non-nil then it contains the current folder |
| 1275 | used to avoid problems in corner cases involving folders whose names end with a | 1348 | name and it is used to avoid problems in corner cases involving |
| 1276 | '+' character." | 1349 | folders whose names end with a '+' character." |
| 1277 | (with-temp-buffer | 1350 | (with-temp-buffer |
| 1278 | (insert line) | 1351 | (insert line) |
| 1279 | (goto-char (point-max)) | 1352 | (goto-char (point-max)) |
| @@ -1328,27 +1401,31 @@ used to avoid problems in corner cases involving folders whose names end with a | |||
| 1328 | (defun mh-visit-folder (folder &optional range index-data) | 1401 | (defun mh-visit-folder (folder &optional range index-data) |
| 1329 | "Visit FOLDER. | 1402 | "Visit FOLDER. |
| 1330 | 1403 | ||
| 1331 | When you want to read the messages that you have refiled into folders, use | 1404 | When you want to read the messages that you have refiled into folders, |
| 1332 | this command to visit the folder. You are prompted for the folder name. | 1405 | use this command to visit the folder. You are prompted for the folder |
| 1406 | name. | ||
| 1333 | 1407 | ||
| 1334 | The folder buffer will show just unseen messages if there are any; otherwise, | 1408 | The folder buffer will show just unseen messages if there are any; |
| 1335 | it will show all the messages in the buffer as long there are fewer than | 1409 | otherwise, it will show all the messages in the buffer as long there |
| 1336 | `mh-large-folder' messages. If there are more, then you are prompted for a | 1410 | are fewer than `mh-large-folder' messages. If there are more, then you |
| 1337 | range of messages to scan. | 1411 | are prompted for a range of messages to scan. |
| 1338 | 1412 | ||
| 1339 | You can provide a prefix argument in order to specify a RANGE of messages to | 1413 | You can provide a prefix argument in order to specify a RANGE of |
| 1340 | show when you visit the folder. In this case, regions are not used to specify | 1414 | messages to show when you visit the folder. In this case, regions are |
| 1341 | the range and `mh-large-folder' is ignored. Check the documentation of | 1415 | not used to specify the range and `mh-large-folder' is ignored. Check |
| 1342 | `mh-interactive-range' to see how RANGE is read in interactive use. | 1416 | the documentation of `mh-interactive-range' to see how RANGE is read |
| 1417 | in interactive use. | ||
| 1343 | 1418 | ||
| 1344 | Note that this command can also be used to create folders. If you specify a | 1419 | Note that this command can also be used to create folders. If you |
| 1345 | folder that does not exist, you will be prompted to create it. | 1420 | specify a folder that does not exist, you will be prompted to create |
| 1421 | it. | ||
| 1346 | 1422 | ||
| 1347 | Do not call this function from outside MH-E; use \\[mh-rmail] instead. | 1423 | Do not call this function from outside MH-E; use \\[mh-rmail] instead. |
| 1348 | 1424 | ||
| 1349 | If, in a program, RANGE is nil (the default), then all messages in FOLDER are | 1425 | If, in a program, RANGE is nil (the default), then all messages in |
| 1350 | displayed. If an index buffer is being created then INDEX-DATA is used to | 1426 | FOLDER are displayed. If an index buffer is being created then |
| 1351 | initialize the index buffer specific data structures." | 1427 | INDEX-DATA is used to initialize the index buffer specific data |
| 1428 | structures." | ||
| 1352 | (interactive (let ((folder-name (mh-prompt-for-folder "Visit" mh-inbox t))) | 1429 | (interactive (let ((folder-name (mh-prompt-for-folder "Visit" mh-inbox t))) |
| 1353 | (list folder-name | 1430 | (list folder-name |
| 1354 | (mh-read-range "Scan" folder-name t nil | 1431 | (mh-read-range "Scan" folder-name t nil |
| @@ -1387,10 +1464,11 @@ initialize the index buffer specific data structures." | |||
| 1387 | 1464 | ||
| 1388 | (defun mh-update-sequences () | 1465 | (defun mh-update-sequences () |
| 1389 | "Flush MH-E's state out to MH. | 1466 | "Flush MH-E's state out to MH. |
| 1390 | This function updates the sequence specified by your \"Unseen-Sequence:\" | 1467 | |
| 1391 | profile component, \"cur\", and the sequence listed by the `mh-tick-seq' | 1468 | This function updates the sequence specified by your |
| 1392 | option which is \"tick\" by default. The message at the cursor is used for | 1469 | \"Unseen-Sequence:\" profile component, \"cur\", and the sequence |
| 1393 | \"cur\"." | 1470 | listed by the `mh-tick-seq' option which is \"tick\" by default. |
| 1471 | The message at the cursor is used for \"cur\"." | ||
| 1394 | (interactive) | 1472 | (interactive) |
| 1395 | ;; mh-update-sequences is the opposite of mh-read-folder-sequences, | 1473 | ;; mh-update-sequences is the opposite of mh-read-folder-sequences, |
| 1396 | ;; which updates MH-E's state from MH. | 1474 | ;; which updates MH-E's state from MH. |
| @@ -1420,10 +1498,9 @@ option which is \"tick\" by default. The message at the cursor is used for | |||
| 1420 | (defun mh-delete-a-msg (message) | 1498 | (defun mh-delete-a-msg (message) |
| 1421 | "Delete MESSAGE. | 1499 | "Delete MESSAGE. |
| 1422 | If MESSAGE is nil then the message at point is deleted. | 1500 | If MESSAGE is nil then the message at point is deleted. |
| 1423 | 1501 | The hook `mh-delete-msg-hook' is called after you mark a message | |
| 1424 | The hook `mh-delete-msg-hook' is called after you mark a message for deletion. | 1502 | for deletion. For example, a past maintainer of MH-E used this |
| 1425 | For example, a past maintainer of MH-E used this once when he kept statistics | 1503 | once when he kept statistics on his mail usage." |
| 1426 | on his mail usage." | ||
| 1427 | (save-excursion | 1504 | (save-excursion |
| 1428 | (if (numberp message) | 1505 | (if (numberp message) |
| 1429 | (mh-goto-msg message nil t) | 1506 | (mh-goto-msg message nil t) |
| @@ -1441,10 +1518,9 @@ on his mail usage." | |||
| 1441 | (defun mh-refile-a-msg (message folder) | 1518 | (defun mh-refile-a-msg (message folder) |
| 1442 | "Refile MESSAGE in FOLDER. | 1519 | "Refile MESSAGE in FOLDER. |
| 1443 | If MESSAGE is nil then the message at point is refiled. | 1520 | If MESSAGE is nil then the message at point is refiled. |
| 1444 | |||
| 1445 | Folder is a symbol, not a string. | 1521 | Folder is a symbol, not a string. |
| 1446 | The hook `mh-refile-msg-hook' is called after a message is marked to be | 1522 | The hook `mh-refile-msg-hook' is called after a message is marked to |
| 1447 | refiled." | 1523 | be refiled." |
| 1448 | (save-excursion | 1524 | (save-excursion |
| 1449 | (if (numberp message) | 1525 | (if (numberp message) |
| 1450 | (mh-goto-msg message nil t) | 1526 | (mh-goto-msg message nil t) |
| @@ -1471,9 +1547,9 @@ refiled." | |||
| 1471 | 1547 | ||
| 1472 | (defun mh-next-msg (&optional wait-after-complaining-flag) | 1548 | (defun mh-next-msg (&optional wait-after-complaining-flag) |
| 1473 | "Move backward or forward to the next undeleted message in the buffer. | 1549 | "Move backward or forward to the next undeleted message in the buffer. |
| 1474 | If optional argument WAIT-AFTER-COMPLAINING-FLAG is non-nil and we are at the | 1550 | If optional argument WAIT-AFTER-COMPLAINING-FLAG is non-nil and |
| 1475 | last message, then wait for a second after telling the user that there aren't | 1551 | we are at the last message, then wait for a second after telling |
| 1476 | any more unread messages." | 1552 | the user that there aren't any more unread messages." |
| 1477 | (if (eq mh-next-direction 'forward) | 1553 | (if (eq mh-next-direction 'forward) |
| 1478 | (mh-next-undeleted-msg 1 wait-after-complaining-flag) | 1554 | (mh-next-undeleted-msg 1 wait-after-complaining-flag) |
| 1479 | (mh-previous-undeleted-msg 1 wait-after-complaining-flag))) | 1555 | (mh-previous-undeleted-msg 1 wait-after-complaining-flag))) |
| @@ -1481,8 +1557,8 @@ any more unread messages." | |||
| 1481 | (defun mh-next-unread-msg (&optional count) | 1557 | (defun mh-next-unread-msg (&optional count) |
| 1482 | "Display next unread message. | 1558 | "Display next unread message. |
| 1483 | 1559 | ||
| 1484 | This command can be given a prefix argument COUNT to specify how many unread | 1560 | This command can be given a prefix argument COUNT to specify how |
| 1485 | messages to skip." | 1561 | many unread messages to skip." |
| 1486 | (interactive "p") | 1562 | (interactive "p") |
| 1487 | (unless (> count 0) | 1563 | (unless (> count 0) |
| 1488 | (error "The function mh-next-unread-msg expects positive argument")) | 1564 | (error "The function mh-next-unread-msg expects positive argument")) |
| @@ -1659,9 +1735,9 @@ Make it the current folder." | |||
| 1659 | 1735 | ||
| 1660 | (defmacro mh-write-file-functions-compat () | 1736 | (defmacro mh-write-file-functions-compat () |
| 1661 | "Return `write-file-functions' if it exists. | 1737 | "Return `write-file-functions' if it exists. |
| 1662 | Otherwise return `local-write-file-hooks'. This macro exists purely for | 1738 | Otherwise return `local-write-file-hooks'. This macro exists |
| 1663 | compatibility. The former symbol is used in Emacs 21.4 onward while the latter | 1739 | purely for compatibility. The former symbol is used in Emacs 21.4 |
| 1664 | is used in previous versions and XEmacs." | 1740 | onward while the latter is used in previous versions and XEmacs." |
| 1665 | (if (boundp 'write-file-functions) | 1741 | (if (boundp 'write-file-functions) |
| 1666 | ''write-file-functions ;Emacs 21.4 | 1742 | ''write-file-functions ;Emacs 21.4 |
| 1667 | ''local-write-file-hooks)) ;<Emacs 21.4, XEmacs | 1743 | ''local-write-file-hooks)) ;<Emacs 21.4, XEmacs |
| @@ -1685,36 +1761,40 @@ is used in previous versions and XEmacs." | |||
| 1685 | (define-derived-mode mh-folder-mode fundamental-mode "MH-Folder" | 1761 | (define-derived-mode mh-folder-mode fundamental-mode "MH-Folder" |
| 1686 | "Major MH-E mode for \"editing\" an MH folder scan listing.\\<mh-folder-mode-map> | 1762 | "Major MH-E mode for \"editing\" an MH folder scan listing.\\<mh-folder-mode-map> |
| 1687 | 1763 | ||
| 1688 | You can show the message the cursor is pointing to, and step through the | 1764 | You can show the message the cursor is pointing to, and step through |
| 1689 | messages. Messages can be marked for deletion or refiling into another | 1765 | the messages. Messages can be marked for deletion or refiling into |
| 1690 | folder; these commands are executed all at once with a separate command. | 1766 | another folder; these commands are executed all at once with a |
| 1767 | separate command. | ||
| 1691 | 1768 | ||
| 1692 | Options that control this mode can be changed with \\[customize-group]; | 1769 | Options that control this mode can be changed with |
| 1693 | specify the \"mh\" group. In particular, please see the `mh-scan-format-file' | 1770 | \\[customize-group]; specify the \"mh\" group. In particular, please |
| 1694 | option if you wish to modify scan's format. | 1771 | see the `mh-scan-format-file' option if you wish to modify scan's |
| 1772 | format. | ||
| 1695 | 1773 | ||
| 1696 | When a folder is visited, the hook `mh-folder-mode-hook' is run. | 1774 | When a folder is visited, the hook `mh-folder-mode-hook' is run. |
| 1697 | 1775 | ||
| 1698 | Ranges | 1776 | Ranges |
| 1699 | ====== | 1777 | ====== |
| 1700 | Many commands that operate on individual messages, such as `mh-forward' or | 1778 | Many commands that operate on individual messages, such as |
| 1701 | `mh-refile-msg' take a RANGE argument. This argument can be used in several | 1779 | `mh-forward' or `mh-refile-msg' take a RANGE argument. This argument |
| 1702 | ways. | 1780 | can be used in several ways. |
| 1703 | 1781 | ||
| 1704 | If you provide the prefix argument (\\[universal-argument]) to these commands, | 1782 | If you provide the prefix argument (\\[universal-argument]) to |
| 1705 | then you will be prompted for the message range. This can be any valid MH | 1783 | these commands, then you will be prompted for the message range. |
| 1706 | range which can include messages, sequences, and the abbreviations (described | 1784 | This can be any valid MH range which can include messages, |
| 1707 | in the mh(1) man page): | 1785 | sequences, and the abbreviations (described in the mh(1) man |
| 1786 | page): | ||
| 1708 | 1787 | ||
| 1709 | <num1>-<num2> | 1788 | <num1>-<num2> |
| 1710 | Indicates all messages in the range <num1> to <num2>, inclusive. The range | 1789 | Indicates all messages in the range <num1> to <num2>, inclusive. |
| 1711 | must be nonempty. | 1790 | The range must be nonempty. |
| 1712 | 1791 | ||
| 1713 | `<num>:N' | 1792 | `<num>:N' |
| 1714 | `<num>:+N' | 1793 | `<num>:+N' |
| 1715 | `<num>:-N' | 1794 | `<num>:-N' |
| 1716 | Up to N messages beginning with (or ending with) message num. Num may be | 1795 | Up to N messages beginning with (or ending with) message num. Num |
| 1717 | any of the predefined symbols: first, prev, cur, next or last. | 1796 | may be any of the predefined symbols: first, prev, cur, next or |
| 1797 | last. | ||
| 1718 | 1798 | ||
| 1719 | `first:N' | 1799 | `first:N' |
| 1720 | `prev:N' | 1800 | `prev:N' |
| @@ -1725,12 +1805,12 @@ in the mh(1) man page): | |||
| 1725 | `all' | 1805 | `all' |
| 1726 | All of the messages. | 1806 | All of the messages. |
| 1727 | 1807 | ||
| 1728 | For example, a range that shows all of these things is `1 2 3 5-10 last:5 | 1808 | For example, a range that shows all of these things is `1 2 3 |
| 1729 | unseen'. | 1809 | 5-10 last:5 unseen'. |
| 1730 | 1810 | ||
| 1731 | If the option `transient-mark-mode' is set to t and you set a region in the | 1811 | If the option `transient-mark-mode' is set to t and you set a |
| 1732 | MH-Folder buffer, then the MH-E command will perform the operation on all | 1812 | region in the MH-Folder buffer, then the MH-E command will |
| 1733 | messages in that region. | 1813 | perform the operation on all messages in that region. |
| 1734 | 1814 | ||
| 1735 | \\{mh-folder-mode-map}" | 1815 | \\{mh-folder-mode-map}" |
| 1736 | (mh-do-in-gnu-emacs | 1816 | (mh-do-in-gnu-emacs |
| @@ -1835,10 +1915,10 @@ messages in that region. | |||
| 1835 | desktop-buffer-name | 1915 | desktop-buffer-name |
| 1836 | desktop-buffer-misc) | 1916 | desktop-buffer-misc) |
| 1837 | "Restore an MH folder buffer specified in a desktop file. | 1917 | "Restore an MH folder buffer specified in a desktop file. |
| 1838 | When desktop creates a buffer, DESKTOP-BUFFER-FILE-NAME holds the file name to | 1918 | When desktop creates a buffer, DESKTOP-BUFFER-FILE-NAME holds the |
| 1839 | visit, DESKTOP-BUFFER-NAME holds the desired buffer name, and | 1919 | file name to visit, DESKTOP-BUFFER-NAME holds the desired buffer |
| 1840 | DESKTOP-BUFFER-MISC holds a list of miscellaneous info used by the | 1920 | name, and DESKTOP-BUFFER-MISC holds a list of miscellaneous info |
| 1841 | `desktop-buffer-handlers' functions." | 1921 | used by the `desktop-buffer-handlers' functions." |
| 1842 | (mh-find-path) | 1922 | (mh-find-path) |
| 1843 | (mh-visit-folder desktop-buffer-name) | 1923 | (mh-visit-folder desktop-buffer-name) |
| 1844 | (current-buffer)) | 1924 | (current-buffer)) |
| @@ -1851,13 +1931,14 @@ DESKTOP-BUFFER-MISC holds a list of miscellaneous info used by the | |||
| 1851 | (defun mh-scan-folder (folder range &optional dont-exec-pending) | 1931 | (defun mh-scan-folder (folder range &optional dont-exec-pending) |
| 1852 | "Scan FOLDER over RANGE. | 1932 | "Scan FOLDER over RANGE. |
| 1853 | 1933 | ||
| 1854 | After the scan is performed, switch to the buffer associated with FOLDER. | 1934 | After the scan is performed, switch to the buffer associated with |
| 1935 | FOLDER. | ||
| 1855 | 1936 | ||
| 1856 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 1937 | Check the documentation of `mh-interactive-range' to see how RANGE is |
| 1857 | interactive use. | 1938 | read in interactive use. |
| 1858 | 1939 | ||
| 1859 | The processing of outstanding commands is not performed if DONT-EXEC-PENDING | 1940 | The processing of outstanding commands is not performed if |
| 1860 | is non-nil." | 1941 | DONT-EXEC-PENDING is non-nil." |
| 1861 | (when (stringp range) | 1942 | (when (stringp range) |
| 1862 | (setq range (delete "" (split-string range "[ \t\n]")))) | 1943 | (setq range (delete "" (split-string range "[ \t\n]")))) |
| 1863 | (cond ((null (get-buffer folder)) | 1944 | (cond ((null (get-buffer folder)) |
| @@ -1880,11 +1961,12 @@ is non-nil." | |||
| 1880 | "Return the column for notations given message number WIDTH. | 1961 | "Return the column for notations given message number WIDTH. |
| 1881 | Note that columns in Emacs start with 0. | 1962 | Note that columns in Emacs start with 0. |
| 1882 | 1963 | ||
| 1883 | If `mh-scan-format-file' is set to \"Use MH-E scan Format\" this means that | 1964 | If `mh-scan-format-file' is set to \"Use MH-E scan Format\" this |
| 1884 | either `mh-scan-format-mh' or `mh-scan-format-nmh' are in use. This function | 1965 | means that either `mh-scan-format-mh' or `mh-scan-format-nmh' are |
| 1885 | therefore assumes that the first column is empty (to provide room for the | 1966 | in use. This function therefore assumes that the first column is |
| 1886 | cursor), the following WIDTH columns contain the message number, and the | 1967 | empty (to provide room for the cursor), the following WIDTH |
| 1887 | column for notations comes after that." | 1968 | columns contain the message number, and the column for notations |
| 1969 | comes after that." | ||
| 1888 | (if (eq mh-scan-format-file t) | 1970 | (if (eq mh-scan-format-file t) |
| 1889 | (max (1+ width) 2) | 1971 | (max (1+ width) 2) |
| 1890 | (error "%s %s" "Can't call mh-msg-num-width-to-column" | 1972 | (error "%s %s" "Can't call mh-msg-num-width-to-column" |
| @@ -1943,9 +2025,9 @@ If UPDATE, append the scan lines, otherwise replace." | |||
| 1943 | After doing an `mh-get-new-mail' operation in this FOLDER, at least | 2025 | After doing an `mh-get-new-mail' operation in this FOLDER, at least |
| 1944 | one line that looks like a truncated message number was found. | 2026 | one line that looks like a truncated message number was found. |
| 1945 | 2027 | ||
| 1946 | Remove the text added by the last `mh-inc' command. It should be the messages | 2028 | Remove the text added by the last `mh-inc' command. It should be the |
| 1947 | cur-last. Call `mh-set-cmd-note', adjusting the notation column with the width | 2029 | messages cur-last. Call `mh-set-cmd-note', adjusting the notation |
| 1948 | of the largest message number in FOLDER. | 2030 | column with the width of the largest message number in FOLDER. |
| 1949 | 2031 | ||
| 1950 | Reformat the message number width on each line in the buffer and trim | 2032 | Reformat the message number width on each line in the buffer and trim |
| 1951 | the line length to fit in the window. | 2033 | the line length to fit in the window. |
| @@ -2066,8 +2148,9 @@ Return in the current buffer." | |||
| 2066 | 2148 | ||
| 2067 | (defun mh-make-folder-mode-line (&optional ignored) | 2149 | (defun mh-make-folder-mode-line (&optional ignored) |
| 2068 | "Set the fields of the mode line for a folder buffer. | 2150 | "Set the fields of the mode line for a folder buffer. |
| 2069 | The optional argument is now obsolete and IGNORED. It used to be used to pass | 2151 | The optional argument is now obsolete and IGNORED. It used to be |
| 2070 | in what is now stored in the buffer-local variable `mh-mode-line-annotation'." | 2152 | used to pass in what is now stored in the buffer-local variable |
| 2153 | `mh-mode-line-annotation'." | ||
| 2071 | (save-excursion | 2154 | (save-excursion |
| 2072 | (save-window-excursion | 2155 | (save-window-excursion |
| 2073 | (mh-first-msg) | 2156 | (mh-first-msg) |
| @@ -2107,8 +2190,8 @@ in what is now stored in the buffer-local variable `mh-mode-line-annotation'." | |||
| 2107 | 2190 | ||
| 2108 | (defun mh-add-sequence-notation (msg internal-seq-flag) | 2191 | (defun mh-add-sequence-notation (msg internal-seq-flag) |
| 2109 | "Add sequence notation to the MSG on the current line. | 2192 | "Add sequence notation to the MSG on the current line. |
| 2110 | If INTERNAL-SEQ-FLAG is non-nil, then refontify the scan line if font-lock is | 2193 | If INTERNAL-SEQ-FLAG is non-nil, then refontify the scan line if |
| 2111 | turned on." | 2194 | font-lock is turned on." |
| 2112 | (with-mh-folder-updating (t) | 2195 | (with-mh-folder-updating (t) |
| 2113 | (save-excursion | 2196 | (save-excursion |
| 2114 | (beginning-of-line) | 2197 | (beginning-of-line) |
| @@ -2129,10 +2212,11 @@ turned on." | |||
| 2129 | 2212 | ||
| 2130 | (defun mh-remove-sequence-notation (msg internal-seq-flag &optional all) | 2213 | (defun mh-remove-sequence-notation (msg internal-seq-flag &optional all) |
| 2131 | "Remove sequence notation from the MSG on the current line. | 2214 | "Remove sequence notation from the MSG on the current line. |
| 2132 | If INTERNAL-SEQ-FLAG is non-nil, then `font-lock' was used to highlight the | 2215 | If INTERNAL-SEQ-FLAG is non-nil, then `font-lock' was used to |
| 2133 | sequence. In that case, no notation needs to be removed. Otherwise the effect | 2216 | highlight the sequence. In that case, no notation needs to be removed. |
| 2134 | of inserting `mh-note-seq' needs to be reversed. | 2217 | Otherwise the effect of inserting `mh-note-seq' needs to be reversed. |
| 2135 | If ALL is non-nil, then all sequence marks on the scan line are removed." | 2218 | If ALL is non-nil, then all sequence marks on the scan line are |
| 2219 | removed." | ||
| 2136 | (with-mh-folder-updating (t) | 2220 | (with-mh-folder-updating (t) |
| 2137 | ;; This takes care of internal sequences... | 2221 | ;; This takes care of internal sequences... |
| 2138 | (mh-notate nil nil mh-cmd-note) | 2222 | (mh-notate nil nil mh-cmd-note) |
| @@ -2172,8 +2256,8 @@ If ALL is non-nil, then all sequence marks on the scan line are removed." | |||
| 2172 | 2256 | ||
| 2173 | (defun mh-goto-cur-msg (&optional minimal-changes-flag) | 2257 | (defun mh-goto-cur-msg (&optional minimal-changes-flag) |
| 2174 | "Position the cursor at the current message. | 2258 | "Position the cursor at the current message. |
| 2175 | When optional argument MINIMAL-CHANGES-FLAG is non-nil, the function doesn't | 2259 | When optional argument MINIMAL-CHANGES-FLAG is non-nil, the |
| 2176 | recenter the folder buffer." | 2260 | function doesn't recenter the folder buffer." |
| 2177 | (let ((cur-msg (car (mh-seq-to-msgs 'cur)))) | 2261 | (let ((cur-msg (car (mh-seq-to-msgs 'cur)))) |
| 2178 | (cond ((and cur-msg | 2262 | (cond ((and cur-msg |
| 2179 | (mh-goto-msg cur-msg t t)) | 2263 | (mh-goto-msg cur-msg t t)) |
| @@ -2187,7 +2271,8 @@ recenter the folder buffer." | |||
| 2187 | 2271 | ||
| 2188 | (defun mh-process-or-undo-commands (folder) | 2272 | (defun mh-process-or-undo-commands (folder) |
| 2189 | "If FOLDER has outstanding commands, then either process or discard them. | 2273 | "If FOLDER has outstanding commands, then either process or discard them. |
| 2190 | Called by functions like `mh-sort-folder', so also invalidate show buffer." | 2274 | Called by functions like `mh-sort-folder', so also invalidate |
| 2275 | show buffer." | ||
| 2191 | (set-buffer folder) | 2276 | (set-buffer folder) |
| 2192 | (if (mh-outstanding-commands-p) | 2277 | (if (mh-outstanding-commands-p) |
| 2193 | (if (or mh-do-not-confirm-flag | 2278 | (if (or mh-do-not-confirm-flag |
| @@ -2202,9 +2287,9 @@ Called by functions like `mh-sort-folder', so also invalidate show buffer." | |||
| 2202 | (defun mh-process-commands (folder) | 2287 | (defun mh-process-commands (folder) |
| 2203 | "Process outstanding commands for FOLDER. | 2288 | "Process outstanding commands for FOLDER. |
| 2204 | 2289 | ||
| 2205 | This function runs `mh-before-commands-processed-hook' before the commands are | 2290 | This function runs `mh-before-commands-processed-hook' before the |
| 2206 | processed and `mh-after-commands-processed-hook' after the commands are | 2291 | commands are processed and `mh-after-commands-processed-hook' |
| 2207 | processed." | 2292 | after the commands are processed." |
| 2208 | (message "Processing deletes and refiles for %s..." folder) | 2293 | (message "Processing deletes and refiles for %s..." folder) |
| 2209 | (set-buffer folder) | 2294 | (set-buffer folder) |
| 2210 | (with-mh-folder-updating (nil) | 2295 | (with-mh-folder-updating (nil) |
| @@ -2334,8 +2419,8 @@ is updated." | |||
| 2334 | (defun mh-coalesce-msg-list (messages) | 2419 | (defun mh-coalesce-msg-list (messages) |
| 2335 | "Given a list of MESSAGES, return a list of message number ranges. | 2420 | "Given a list of MESSAGES, return a list of message number ranges. |
| 2336 | This is the inverse of `mh-read-msg-list', which expands ranges. | 2421 | This is the inverse of `mh-read-msg-list', which expands ranges. |
| 2337 | Message lists passed to MH programs should be processed by this function | 2422 | Message lists passed to MH programs should be processed by this |
| 2338 | to avoid exceeding system command line argument limits." | 2423 | function to avoid exceeding system command line argument limits." |
| 2339 | (let ((msgs (sort (copy-sequence messages) 'mh-greaterp)) | 2424 | (let ((msgs (sort (copy-sequence messages) 'mh-greaterp)) |
| 2340 | (range-high nil) | 2425 | (range-high nil) |
| 2341 | (prev -1) | 2426 | (prev -1) |
| @@ -2433,8 +2518,9 @@ Expands ranges into set of individual numbers." | |||
| 2433 | (defun mh-notate-user-sequences (&optional range) | 2518 | (defun mh-notate-user-sequences (&optional range) |
| 2434 | "Mark user-defined sequences in RANGE. | 2519 | "Mark user-defined sequences in RANGE. |
| 2435 | 2520 | ||
| 2436 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 2521 | Check the documentation of `mh-interactive-range' to see how |
| 2437 | interactive use; if nil all messages are notated." | 2522 | RANGE is read in interactive use; if nil all messages are |
| 2523 | notated." | ||
| 2438 | (unless range | 2524 | (unless range |
| 2439 | (setq range (cons (point-min) (point-max)))) | 2525 | (setq range (cons (point-min) (point-max)))) |
| 2440 | (let ((seqs mh-seq-list) | 2526 | (let ((seqs mh-seq-list) |
| @@ -2464,10 +2550,11 @@ interactive use; if nil all messages are notated." | |||
| 2464 | (defun mh-delete-msg-from-seq (range sequence &optional internal-flag) | 2550 | (defun mh-delete-msg-from-seq (range sequence &optional internal-flag) |
| 2465 | "Delete RANGE from SEQUENCE. | 2551 | "Delete RANGE from SEQUENCE. |
| 2466 | 2552 | ||
| 2467 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 2553 | Check the documentation of `mh-interactive-range' to see how |
| 2468 | interactive use. | 2554 | RANGE is read in interactive use. |
| 2469 | 2555 | ||
| 2470 | In a program, non-nil INTERNAL-FLAG means do not inform MH of the change." | 2556 | In a program, non-nil INTERNAL-FLAG means do not inform MH of the |
| 2557 | change." | ||
| 2471 | (interactive (list (mh-interactive-range "Delete") | 2558 | (interactive (list (mh-interactive-range "Delete") |
| 2472 | (mh-read-seq-default "Delete from" t) | 2559 | (mh-read-seq-default "Delete from" t) |
| 2473 | nil)) | 2560 | nil)) |
| @@ -2495,15 +2582,16 @@ In a program, non-nil INTERNAL-FLAG means do not inform MH of the change." | |||
| 2495 | (defun mh-catchup (range) | 2582 | (defun mh-catchup (range) |
| 2496 | "Delete RANGE from the \"unseen\" sequence. | 2583 | "Delete RANGE from the \"unseen\" sequence. |
| 2497 | 2584 | ||
| 2498 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 2585 | Check the documentation of `mh-interactive-range' to see how |
| 2499 | interactive use." | 2586 | RANGE is read in interactive use." |
| 2500 | (interactive (list (mh-interactive-range "Catchup" | 2587 | (interactive (list (mh-interactive-range "Catchup" |
| 2501 | (cons (point-min) (point-max))))) | 2588 | (cons (point-min) (point-max))))) |
| 2502 | (mh-delete-msg-from-seq range mh-unseen-seq)) | 2589 | (mh-delete-msg-from-seq range mh-unseen-seq)) |
| 2503 | 2590 | ||
| 2504 | (defun mh-delete-a-msg-from-seq (msg sequence internal-flag) | 2591 | (defun mh-delete-a-msg-from-seq (msg sequence internal-flag) |
| 2505 | "Delete MSG from SEQUENCE. | 2592 | "Delete MSG from SEQUENCE. |
| 2506 | If INTERNAL-FLAG is non-nil, then do not inform MH of the change." | 2593 | If INTERNAL-FLAG is non-nil, then do not inform MH of the |
| 2594 | change." | ||
| 2507 | (let ((entry (mh-find-seq sequence))) | 2595 | (let ((entry (mh-find-seq sequence))) |
| 2508 | (when (and entry (memq msg (mh-seq-msgs entry))) | 2596 | (when (and entry (memq msg (mh-seq-msgs entry))) |
| 2509 | (if (not internal-flag) | 2597 | (if (not internal-flag) |
| @@ -2530,7 +2618,8 @@ Signals an error if SEQ is an invalid name." | |||
| 2530 | 2618 | ||
| 2531 | (defun mh-seq-containing-msg (msg &optional include-internal-flag) | 2619 | (defun mh-seq-containing-msg (msg &optional include-internal-flag) |
| 2532 | "Return a list of the sequences containing MSG. | 2620 | "Return a list of the sequences containing MSG. |
| 2533 | If INCLUDE-INTERNAL-FLAG non-nil, include MH-E internal sequences in list." | 2621 | If INCLUDE-INTERNAL-FLAG non-nil, include MH-E internal sequences |
| 2622 | in list." | ||
| 2534 | (let ((l mh-seq-list) | 2623 | (let ((l mh-seq-list) |
| 2535 | (seqs ())) | 2624 | (seqs ())) |
| 2536 | (while l | 2625 | (while l |
diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el index ee8e757e728..5c3db1dd809 100644 --- a/lisp/mh-e/mh-funcs.el +++ b/lisp/mh-e/mh-funcs.el | |||
| @@ -57,17 +57,19 @@ | |||
| 57 | (defun mh-burst-digest () | 57 | (defun mh-burst-digest () |
| 58 | "Break up digest into separate messages\\<mh-folder-mode-map>. | 58 | "Break up digest into separate messages\\<mh-folder-mode-map>. |
| 59 | 59 | ||
| 60 | This command uses the MH command \"burst\" to break out each message in the | 60 | This command uses the MH command \"burst\" to break out each |
| 61 | digest into its own message. Using this command, you can quickly delete | 61 | message in the digest into its own message. Using this command, |
| 62 | unwanted messages, like this: Once the digest is split up, toggle out of | 62 | you can quickly delete unwanted messages, like this: Once the |
| 63 | MH-Folder Show mode with \\[mh-toggle-showing] so that the scan lines fill the | 63 | digest is split up, toggle out of MH-Folder Show mode with |
| 64 | screen and messages aren't displayed. Then use \\[mh-delete-msg] to quickly | 64 | \\[mh-toggle-showing] so that the scan lines fill the screen and |
| 65 | delete messages that you don't want to read (based on the \"Subject:\" header | 65 | messages aren't displayed. Then use \\[mh-delete-msg] to quickly |
| 66 | field). You can also burst the digest to reply directly to the people who | 66 | delete messages that you don't want to read (based on the |
| 67 | posted the messages in the digest. One problem you may encounter is that the | 67 | \"Subject:\" header field). You can also burst the digest to |
| 68 | \"From:\" header fields are preceded with a \">\" so that your reply can't | 68 | reply directly to the people who posted the messages in the |
| 69 | create the \"To:\" field correctly. In this case, you must correct the \"To:\" | 69 | digest. One problem you may encounter is that the \"From:\" |
| 70 | field yourself." | 70 | header fields are preceded with a \">\" so that your reply can't |
| 71 | create the \"To:\" field correctly. In this case, you must | ||
| 72 | correct the \"To:\" field yourself." | ||
| 71 | (interactive) | 73 | (interactive) |
| 72 | (let ((digest (mh-get-msg-num t))) | 74 | (let ((digest (mh-get-msg-num t))) |
| 73 | (mh-process-or-undo-commands mh-current-folder) | 75 | (mh-process-or-undo-commands mh-current-folder) |
| @@ -85,15 +87,15 @@ field yourself." | |||
| 85 | (defun mh-copy-msg (range folder) | 87 | (defun mh-copy-msg (range folder) |
| 86 | "Copy RANGE to FOLDER\\<mh-folder-mode-map>. | 88 | "Copy RANGE to FOLDER\\<mh-folder-mode-map>. |
| 87 | 89 | ||
| 88 | If you wish to copy a message to another folder, you can use this command | 90 | If you wish to copy a message to another folder, you can use this |
| 89 | \(see the \"-link\" argument to \"refile\"). Like the command | 91 | command \(see the \"-link\" argument to \"refile\"). Like the |
| 90 | \\[mh-refile-msg], this command prompts you for the name of the target folder | 92 | command \\[mh-refile-msg], this command prompts you for the name |
| 91 | and you can specify a range. Note that unlike the command \\[mh-refile-msg], | 93 | of the target folder and you can specify a range. Note that |
| 92 | the copy takes place immediately. The original copy remains in the current | 94 | unlike the command \\[mh-refile-msg], the copy takes place |
| 93 | folder. | 95 | immediately. The original copy remains in the current folder. |
| 94 | 96 | ||
| 95 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 97 | Check the documentation of `mh-interactive-range' to see how |
| 96 | interactive use." | 98 | RANGE is read in interactive use." |
| 97 | (interactive (list (mh-interactive-range "Copy") | 99 | (interactive (list (mh-interactive-range "Copy") |
| 98 | (mh-prompt-for-folder "Copy to" "" t))) | 100 | (mh-prompt-for-folder "Copy to" "" t))) |
| 99 | (let ((msg-list (let ((result ())) | 101 | (let ((msg-list (let ((result ())) |
| @@ -108,13 +110,13 @@ interactive use." | |||
| 108 | (defun mh-kill-folder () | 110 | (defun mh-kill-folder () |
| 109 | "Remove folder. | 111 | "Remove folder. |
| 110 | 112 | ||
| 111 | Remove all of the messages (files) within the current folder, and then | 113 | Remove all of the messages (files) within the current folder, and |
| 112 | remove the folder (directory) itself. | 114 | then remove the folder (directory) itself. |
| 113 | 115 | ||
| 114 | Run the abnormal hook `mh-kill-folder-suppress-prompt-hooks'. The hook | 116 | Run the abnormal hook `mh-kill-folder-suppress-prompt-hooks'. The |
| 115 | functions are called with no arguments and should return a non-nil | 117 | hook functions are called with no arguments and should return a |
| 116 | value to suppress the normal prompt when you remove a folder. This is | 118 | non-nil value to suppress the normal prompt when you remove a |
| 117 | useful for folders that are easily regenerated." | 119 | folder. This is useful for folders that are easily regenerated." |
| 118 | (interactive) | 120 | (interactive) |
| 119 | (if (or (run-hook-with-args-until-success | 121 | (if (or (run-hook-with-args-until-success |
| 120 | 'mh-kill-folder-suppress-prompt-hooks) | 122 | 'mh-kill-folder-suppress-prompt-hooks) |
| @@ -172,14 +174,15 @@ Display the results only if something went wrong." | |||
| 172 | (defun mh-pack-folder (range) | 174 | (defun mh-pack-folder (range) |
| 173 | "Pack folder\\<mh-folder-mode-map>. | 175 | "Pack folder\\<mh-folder-mode-map>. |
| 174 | 176 | ||
| 175 | This command packs the folder, removing gaps from the numbering sequence. If | 177 | This command packs the folder, removing gaps from the numbering |
| 176 | you don't want to rescan the entire folder afterward, this command will accept | 178 | sequence. If you don't want to rescan the entire folder |
| 177 | a RANGE. Check the documentation of `mh-interactive-range' to see how RANGE is | 179 | afterward, this command will accept a RANGE. Check the |
| 178 | read in interactive use. | 180 | documentation of `mh-interactive-range' to see how RANGE is read |
| 181 | in interactive use. | ||
| 179 | 182 | ||
| 180 | This command will ask if you want to process refiles or deletes first and then | 183 | This command will ask if you want to process refiles or deletes |
| 181 | either run \\[mh-execute-commands] for you or undo the pending refiles and | 184 | first and then either run \\[mh-execute-commands] for you or undo |
| 182 | deletes, which are lost." | 185 | the pending refiles and deletes, which are lost." |
| 183 | (interactive (list (if current-prefix-arg | 186 | (interactive (list (if current-prefix-arg |
| 184 | (mh-read-range "Scan" mh-current-folder t nil t | 187 | (mh-read-range "Scan" mh-current-folder t nil t |
| 185 | mh-interpret-number-as-range-flag) | 188 | mh-interpret-number-as-range-flag) |
| @@ -210,9 +213,10 @@ Display RANGE after packing, or the entire folder if RANGE is nil." | |||
| 210 | (defun mh-pipe-msg (command include-header) | 213 | (defun mh-pipe-msg (command include-header) |
| 211 | "Pipe message through shell command COMMAND. | 214 | "Pipe message through shell command COMMAND. |
| 212 | 215 | ||
| 213 | You are prompted for the Unix command through which you wish to run your | 216 | You are prompted for the Unix command through which you wish to |
| 214 | message. If you give an argument INCLUDE-HEADER to this command, the message | 217 | run your message. If you give an argument INCLUDE-HEADER to this |
| 215 | header is included in the text passed to the command." | 218 | command, the message header is included in the text passed to the |
| 219 | command." | ||
| 216 | (interactive | 220 | (interactive |
| 217 | (list (read-string "Shell command on message: ") current-prefix-arg)) | 221 | (list (read-string "Shell command on message: ") current-prefix-arg)) |
| 218 | (let ((msg-file-to-pipe (mh-msg-filename (mh-get-msg-num t))) | 222 | (let ((msg-file-to-pipe (mh-msg-filename (mh-get-msg-num t))) |
| @@ -263,9 +267,11 @@ header is included in the text passed to the command." | |||
| 263 | ;;;###mh-autoload | 267 | ;;;###mh-autoload |
| 264 | (defun mh-sort-folder (&optional extra-args) | 268 | (defun mh-sort-folder (&optional extra-args) |
| 265 | "Sort the messages in the current folder by date. | 269 | "Sort the messages in the current folder by date. |
| 270 | |||
| 266 | Calls the MH program sortm to do the work. | 271 | Calls the MH program sortm to do the work. |
| 267 | The arguments in the list `mh-sortm-args' are passed to sortm if the optional | 272 | |
| 268 | argument EXTRA-ARGS is given." | 273 | The arguments in the list `mh-sortm-args' are passed to sortm if |
| 274 | the optional argument EXTRA-ARGS is given." | ||
| 269 | (interactive "P") | 275 | (interactive "P") |
| 270 | (mh-process-or-undo-commands mh-current-folder) | 276 | (mh-process-or-undo-commands mh-current-folder) |
| 271 | (setq mh-next-direction 'forward) | 277 | (setq mh-next-direction 'forward) |
| @@ -299,10 +305,11 @@ argument EXTRA-ARGS is given." | |||
| 299 | (defun mh-store-msg (directory) | 305 | (defun mh-store-msg (directory) |
| 300 | "Unpack message created with `uudecode' or `shar'. | 306 | "Unpack message created with `uudecode' or `shar'. |
| 301 | 307 | ||
| 302 | The default DIRECTORY for extraction is the current directory; however, you | 308 | The default DIRECTORY for extraction is the current directory; |
| 303 | have a chance to specify a different extraction directory. The next time you | 309 | however, you have a chance to specify a different extraction |
| 304 | use this command, the default directory is the last directory you used. If you | 310 | directory. The next time you use this command, the default |
| 305 | would like to change the initial default directory, customize the option | 311 | directory is the last directory you used. If you would like to |
| 312 | change the initial default directory, customize the option | ||
| 306 | `mh-store-default-directory'." | 313 | `mh-store-default-directory'." |
| 307 | (interactive (list (let ((udir (or mh-store-default-directory | 314 | (interactive (list (let ((udir (or mh-store-default-directory |
| 308 | default-directory))) | 315 | default-directory))) |
| @@ -318,9 +325,11 @@ would like to change the initial default directory, customize the option | |||
| 318 | ;;;###mh-autoload | 325 | ;;;###mh-autoload |
| 319 | (defun mh-store-buffer (directory) | 326 | (defun mh-store-buffer (directory) |
| 320 | "Store the file(s) contained in the current buffer into DIRECTORY. | 327 | "Store the file(s) contained in the current buffer into DIRECTORY. |
| 328 | |||
| 321 | The buffer can contain a shar file or uuencoded file. | 329 | The buffer can contain a shar file or uuencoded file. |
| 322 | Default directory is the last directory used, or initially the value of | 330 | |
| 323 | `mh-store-default-directory' or the current directory." | 331 | Default directory is the last directory used, or initially the |
| 332 | value of `mh-store-default-directory' or the current directory." | ||
| 324 | (interactive (list (let ((udir (or mh-store-default-directory | 333 | (interactive (list (let ((udir (or mh-store-default-directory |
| 325 | default-directory))) | 334 | default-directory))) |
| 326 | (read-file-name "Store buffer in directory: " | 335 | (read-file-name "Store buffer in directory: " |
diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el index 71220e2dd3d..a52bc5e463e 100644 --- a/lisp/mh-e/mh-gnus.el +++ b/lisp/mh-e/mh-gnus.el | |||
| @@ -41,9 +41,9 @@ | |||
| 41 | 41 | ||
| 42 | (defmacro mh-defun-compat (function arg-list &rest body) | 42 | (defmacro mh-defun-compat (function arg-list &rest body) |
| 43 | "This is a macro to define functions which are not defined. | 43 | "This is a macro to define functions which are not defined. |
| 44 | It is used for Gnus utility functions which were added recently. If FUNCTION | 44 | It is used for Gnus utility functions which were added recently. |
| 45 | is not defined then it is defined to have argument list, ARG-LIST and body, | 45 | If FUNCTION is not defined then it is defined to have argument |
| 46 | BODY." | 46 | list, ARG-LIST and body, BODY." |
| 47 | (let ((defined-p (fboundp function))) | 47 | (let ((defined-p (fboundp function))) |
| 48 | (unless defined-p | 48 | (unless defined-p |
| 49 | `(defun ,function ,arg-list ,@body)))) | 49 | `(defun ,function ,arg-list ,@body)))) |
| @@ -51,9 +51,9 @@ BODY." | |||
| 51 | 51 | ||
| 52 | (defmacro mh-defmacro-compat (function arg-list &rest body) | 52 | (defmacro mh-defmacro-compat (function arg-list &rest body) |
| 53 | "This is a macro to define functions which are not defined. | 53 | "This is a macro to define functions which are not defined. |
| 54 | It is used for Gnus utility functions which were added recently. If FUNCTION | 54 | It is used for Gnus utility functions which were added recently. |
| 55 | is not defined then it is defined to have argument list, ARG-LIST and body, | 55 | If FUNCTION is not defined then it is defined to have argument |
| 56 | BODY." | 56 | list, ARG-LIST and body, BODY." |
| 57 | (let ((defined-p (fboundp function))) | 57 | (let ((defined-p (fboundp function))) |
| 58 | (unless defined-p | 58 | (unless defined-p |
| 59 | `(defmacro ,function ,arg-list ,@body)))) | 59 | `(defmacro ,function ,arg-list ,@body)))) |
diff --git a/lisp/mh-e/mh-identity.el b/lisp/mh-e/mh-identity.el index 1e621af7df9..508b747718c 100644 --- a/lisp/mh-e/mh-identity.el +++ b/lisp/mh-e/mh-identity.el | |||
| @@ -47,14 +47,15 @@ | |||
| 47 | 47 | ||
| 48 | (defvar mh-identity-pgg-default-user-id nil | 48 | (defvar mh-identity-pgg-default-user-id nil |
| 49 | "Holds the GPG key ID to be used by pgg.el. | 49 | "Holds the GPG key ID to be used by pgg.el. |
| 50 | This is normally set as part of an Identity in `mh-identity-list'.") | 50 | This is normally set as part of an Identity in |
| 51 | `mh-identity-list'.") | ||
| 51 | (make-variable-buffer-local 'mh-identity-pgg-default-user-id) | 52 | (make-variable-buffer-local 'mh-identity-pgg-default-user-id) |
| 52 | 53 | ||
| 53 | ;;;###mh-autoload | 54 | ;;;###mh-autoload |
| 54 | (defun mh-identity-make-menu () | 55 | (defun mh-identity-make-menu () |
| 55 | "Build the Identity menu. | 56 | "Build the Identity menu. |
| 56 | This should be called any time `mh-identity-list' or `mh-auto-fields-list' | 57 | This should be called any time `mh-identity-list' or |
| 57 | change." | 58 | `mh-auto-fields-list' change." |
| 58 | (easy-menu-define mh-identity-menu mh-letter-mode-map | 59 | (easy-menu-define mh-identity-menu mh-letter-mode-map |
| 59 | "MH-E identity menu" | 60 | "MH-E identity menu" |
| 60 | (append | 61 | (append |
| @@ -87,9 +88,9 @@ change." | |||
| 87 | ;;;###mh-autoload | 88 | ;;;###mh-autoload |
| 88 | (defun mh-identity-list-set (symbol value) | 89 | (defun mh-identity-list-set (symbol value) |
| 89 | "Update the `mh-identity-list' variable, and rebuild the menu. | 90 | "Update the `mh-identity-list' variable, and rebuild the menu. |
| 90 | Sets the default for SYMBOL (for example, `mh-identity-list') to VALUE (as set | 91 | Sets the default for SYMBOL (for example, `mh-identity-list') to |
| 91 | in customization). This is called after 'customize is used to alter | 92 | VALUE (as set in customization). This is called after 'customize |
| 92 | `mh-identity-list'." | 93 | is used to alter `mh-identity-list'." |
| 93 | (set-default symbol value) | 94 | (set-default symbol value) |
| 94 | (mh-identity-make-menu)) | 95 | (mh-identity-make-menu)) |
| 95 | 96 | ||
| @@ -120,10 +121,10 @@ Return t if anything is deleted." | |||
| 120 | 121 | ||
| 121 | (defun mh-identity-field-handler (field) | 122 | (defun mh-identity-field-handler (field) |
| 122 | "Return the handler for header FIELD or nil if none set. | 123 | "Return the handler for header FIELD or nil if none set. |
| 123 | The field name is downcased. If the FIELD begins with the character | 124 | The field name is downcased. If the FIELD begins with the |
| 124 | `:', then it must have a special handler defined in | 125 | character `:', then it must have a special handler defined in |
| 125 | `mh-identity-handlers', else return an error since it is not a valid | 126 | `mh-identity-handlers', else return an error since it is not a |
| 126 | header field." | 127 | valid header field." |
| 127 | (or (cdr (mh-assoc-ignore-case field mh-identity-handlers)) | 128 | (or (cdr (mh-assoc-ignore-case field mh-identity-handlers)) |
| 128 | (and (eq (aref field 0) ?:) | 129 | (and (eq (aref field 0) ?:) |
| 129 | (error "Field %s - unknown mh-identity-handler" field)) | 130 | (error "Field %s - unknown mh-identity-handler" field)) |
| @@ -169,8 +170,8 @@ See `mh-identity-list'." | |||
| 169 | (defun mh-identity-handler-gpg-identity (field action &optional value) | 170 | (defun mh-identity-handler-gpg-identity (field action &optional value) |
| 170 | "Process header FIELD \":pgg-default-user-id\". | 171 | "Process header FIELD \":pgg-default-user-id\". |
| 171 | The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. | 172 | The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. |
| 172 | The buffer-local variable `mh-identity-pgg-default-user-id' is set to VALUE | 173 | The buffer-local variable `mh-identity-pgg-default-user-id' is set to |
| 173 | when action 'add is selected." | 174 | VALUE when action 'add is selected." |
| 174 | (cond | 175 | (cond |
| 175 | ((or (equal action 'remove) | 176 | ((or (equal action 'remove) |
| 176 | (not value) | 177 | (not value) |
| @@ -182,7 +183,8 @@ when action 'add is selected." | |||
| 182 | ;;;###mh-autoload | 183 | ;;;###mh-autoload |
| 183 | (defun mh-identity-handler-signature (field action &optional value) | 184 | (defun mh-identity-handler-signature (field action &optional value) |
| 184 | "Process header FIELD \":signature\". | 185 | "Process header FIELD \":signature\". |
| 185 | The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." | 186 | The ACTION is one of 'remove or 'add. If 'add, the VALUE is |
| 187 | added." | ||
| 186 | (cond | 188 | (cond |
| 187 | ((equal action 'remove) | 189 | ((equal action 'remove) |
| 188 | (when (and (markerp mh-identity-signature-start) | 190 | (when (and (markerp mh-identity-signature-start) |
| @@ -212,7 +214,8 @@ The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." | |||
| 212 | ;;;###mh-autoload | 214 | ;;;###mh-autoload |
| 213 | (defun mh-identity-handler-attribution-verb (field action &optional value) | 215 | (defun mh-identity-handler-attribution-verb (field action &optional value) |
| 214 | "Process header FIELD \":attribution-verb\". | 216 | "Process header FIELD \":attribution-verb\". |
| 215 | The ACTION is one of 'remove or 'add. If 'add, the VALUE is added." | 217 | The ACTION is one of 'remove or 'add. If 'add, the VALUE is |
| 218 | added." | ||
| 216 | (when (and (markerp mh-identity-attribution-verb-start) | 219 | (when (and (markerp mh-identity-attribution-verb-start) |
| 217 | (markerp mh-identity-attribution-verb-end)) | 220 | (markerp mh-identity-attribution-verb-end)) |
| 218 | (delete-region mh-identity-attribution-verb-start | 221 | (delete-region mh-identity-attribution-verb-start |
| @@ -241,9 +244,9 @@ If VALUE is nil, use `mh-extract-from-attribution-verb'." | |||
| 241 | 244 | ||
| 242 | (defun mh-identity-handler-default (field action top &optional value) | 245 | (defun mh-identity-handler-default (field action top &optional value) |
| 243 | "Process header FIELD. | 246 | "Process header FIELD. |
| 244 | The ACTION is one of 'remove or 'add. If TOP is non-nil, add the field and its | 247 | The ACTION is one of 'remove or 'add. If TOP is non-nil, add the |
| 245 | VALUE at the top of the header, else add it at the bottom of the header. If | 248 | field and its VALUE at the top of the header, else add it at the |
| 246 | action is 'add, the VALUE is added." | 249 | bottom of the header. If action is 'add, the VALUE is added." |
| 247 | (let ((field-colon (if (string-match "^.*:$" field) | 250 | (let ((field-colon (if (string-match "^.*:$" field) |
| 248 | field | 251 | field |
| 249 | (concat field ":")))) | 252 | (concat field ":")))) |
| @@ -269,15 +272,17 @@ action is 'add, the VALUE is added." | |||
| 269 | ;;;###mh-autoload | 272 | ;;;###mh-autoload |
| 270 | (defun mh-identity-handler-top (field action &optional value) | 273 | (defun mh-identity-handler-top (field action &optional value) |
| 271 | "Process header FIELD. | 274 | "Process header FIELD. |
| 272 | The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. | 275 | The ACTION is one of 'remove or 'add. If 'add, the VALUE is |
| 273 | If the field wasn't present, it is added to the top of the header." | 276 | added. If the field wasn't present, it is added to the top of the |
| 277 | header." | ||
| 274 | (mh-identity-handler-default field action t value)) | 278 | (mh-identity-handler-default field action t value)) |
| 275 | 279 | ||
| 276 | ;;;###mh-autoload | 280 | ;;;###mh-autoload |
| 277 | (defun mh-identity-handler-bottom (field action &optional value) | 281 | (defun mh-identity-handler-bottom (field action &optional value) |
| 278 | "Process header FIELD. | 282 | "Process header FIELD. |
| 279 | The ACTION is one of 'remove or 'add. If 'add, the VALUE is added. | 283 | The ACTION is one of 'remove or 'add. If 'add, the VALUE is |
| 280 | If the field wasn't present, it is added to the bottom of the header." | 284 | added. If the field wasn't present, it is added to the bottom of |
| 285 | the header." | ||
| 281 | (mh-identity-handler-default field action nil value)) | 286 | (mh-identity-handler-default field action nil value)) |
| 282 | 287 | ||
| 283 | (provide 'mh-identity) | 288 | (provide 'mh-identity) |
diff --git a/lisp/mh-e/mh-index.el b/lisp/mh-e/mh-index.el index e261b47b753..d0bab9d120f 100644 --- a/lisp/mh-e/mh-index.el +++ b/lisp/mh-e/mh-index.el | |||
| @@ -158,9 +158,10 @@ | |||
| 158 | 158 | ||
| 159 | (defun mh-index-execute (cmd &rest args) | 159 | (defun mh-index-execute (cmd &rest args) |
| 160 | "Partial imitation of xargs. | 160 | "Partial imitation of xargs. |
| 161 | The current buffer contains a list of strings, one on each line. The function | 161 | The current buffer contains a list of strings, one on each line. |
| 162 | will execute CMD with ARGS and pass the first `mh-index-max-cmdline-args' | 162 | The function will execute CMD with ARGS and pass the first |
| 163 | strings to it. This is repeated till all the strings have been used." | 163 | `mh-index-max-cmdline-args' strings to it. This is repeated till |
| 164 | all the strings have been used." | ||
| 164 | (goto-char (point-min)) | 165 | (goto-char (point-min)) |
| 165 | (let ((current-buffer (current-buffer))) | 166 | (let ((current-buffer (current-buffer))) |
| 166 | (with-temp-buffer | 167 | (with-temp-buffer |
| @@ -183,12 +184,14 @@ strings to it. This is repeated till all the strings have been used." | |||
| 183 | 184 | ||
| 184 | (defun mh-index-update-single-msg (msg checksum origin-map) | 185 | (defun mh-index-update-single-msg (msg checksum origin-map) |
| 185 | "Update various maps for one message. | 186 | "Update various maps for one message. |
| 186 | MSG is a index folder message, CHECKSUM its MD5 hash and ORIGIN-MAP, if | 187 | MSG is a index folder message, CHECKSUM its MD5 hash and |
| 187 | non-nil, a hashtable containing which maps each message in the index folder to | 188 | ORIGIN-MAP, if non-nil, a hashtable containing which maps each |
| 188 | the folder and message that it was copied from. The function updates the hash | 189 | message in the index folder to the folder and message that it was |
| 189 | tables `mh-index-msg-checksum-map' and `mh-index-checksum-origin-map'. | 190 | copied from. The function updates the hash tables |
| 190 | 191 | `mh-index-msg-checksum-map' and `mh-index-checksum-origin-map'. | |
| 191 | This function should only be called in the appropriate index folder buffer." | 192 | |
| 193 | This function should only be called in the appropriate index | ||
| 194 | folder buffer." | ||
| 192 | (cond ((and origin-map (gethash checksum mh-index-checksum-origin-map)) | 195 | (cond ((and origin-map (gethash checksum mh-index-checksum-origin-map)) |
| 193 | (let* ((intermediate (gethash msg origin-map)) | 196 | (let* ((intermediate (gethash msg origin-map)) |
| 194 | (ofolder (car intermediate)) | 197 | (ofolder (car intermediate)) |
| @@ -208,10 +211,11 @@ This function should only be called in the appropriate index folder buffer." | |||
| 208 | ;;;###mh-autoload | 211 | ;;;###mh-autoload |
| 209 | (defun mh-index-update-maps (folder &optional origin-map) | 212 | (defun mh-index-update-maps (folder &optional origin-map) |
| 210 | "Annotate all as yet unannotated messages in FOLDER with their MD5 hash. | 213 | "Annotate all as yet unannotated messages in FOLDER with their MD5 hash. |
| 211 | As a side effect msg -> checksum map is updated. Optional argument ORIGIN-MAP | 214 | As a side effect msg -> checksum map is updated. Optional |
| 212 | is a hashtable which maps each message in the index folder to the original | 215 | argument ORIGIN-MAP is a hashtable which maps each message in the |
| 213 | folder and message from whence it was copied. If present the | 216 | index folder to the original folder and message from whence it |
| 214 | checksum -> (origin-folder, origin-index) map is updated too." | 217 | was copied. If present the checksum -> (origin-folder, |
| 218 | origin-index) map is updated too." | ||
| 215 | (clrhash mh-index-msg-checksum-map) | 219 | (clrhash mh-index-msg-checksum-map) |
| 216 | (save-excursion | 220 | (save-excursion |
| 217 | ;; Clear temp buffer | 221 | ;; Clear temp buffer |
| @@ -266,8 +270,9 @@ checksum -> (origin-folder, origin-index) map is updated too." | |||
| 266 | 270 | ||
| 267 | (defun mh-unpropagated-sequences () | 271 | (defun mh-unpropagated-sequences () |
| 268 | "Return a list of sequences that aren't propagated to the source folders. | 272 | "Return a list of sequences that aren't propagated to the source folders. |
| 269 | It is just the sequences in the variable `mh-unpropagated-sequences' in | 273 | It is just the sequences in the variable |
| 270 | addition to the Previous-Sequence (see mh-profile 5)." | 274 | `mh-unpropagated-sequences' in addition to the |
| 275 | Previous-Sequence (see mh-profile 5)." | ||
| 271 | (if mh-previous-seq | 276 | (if mh-previous-seq |
| 272 | (cons mh-previous-seq mh-unpropagated-sequences) | 277 | (cons mh-previous-seq mh-unpropagated-sequences) |
| 273 | mh-unpropagated-sequences)) | 278 | mh-unpropagated-sequences)) |
| @@ -275,8 +280,8 @@ addition to the Previous-Sequence (see mh-profile 5)." | |||
| 275 | ;;;###mh-autoload | 280 | ;;;###mh-autoload |
| 276 | (defun mh-create-sequence-map (seq-list) | 281 | (defun mh-create-sequence-map (seq-list) |
| 277 | "Return a map from msg number to list of sequences in which it is present. | 282 | "Return a map from msg number to list of sequences in which it is present. |
| 278 | SEQ-LIST is an assoc list whose keys are sequence names and whose cdr is the | 283 | SEQ-LIST is an assoc list whose keys are sequence names and whose |
| 279 | list of messages in that sequence." | 284 | cdr is the list of messages in that sequence." |
| 280 | (loop with map = (make-hash-table) | 285 | (loop with map = (make-hash-table) |
| 281 | for seq in seq-list | 286 | for seq in seq-list |
| 282 | when (and (not (memq (car seq) (mh-unpropagated-sequences))) | 287 | when (and (not (memq (car seq) (mh-unpropagated-sequences))) |
| @@ -316,10 +321,11 @@ list of messages in that sequence." | |||
| 316 | 321 | ||
| 317 | (defun mh-index-generate-pretty-name (string) | 322 | (defun mh-index-generate-pretty-name (string) |
| 318 | "Given STRING generate a name which is suitable for use as a folder name. | 323 | "Given STRING generate a name which is suitable for use as a folder name. |
| 319 | White space from the beginning and end are removed. All spaces in the name are | 324 | White space from the beginning and end are removed. All spaces in |
| 320 | replaced with underscores and all / are replaced with $. If STRING is longer | 325 | the name are replaced with underscores and all / are replaced |
| 321 | than 20 it is truncated too. STRING could be a list of strings in which case | 326 | with $. If STRING is longer than 20 it is truncated too. STRING |
| 322 | they are concatenated to construct the base name." | 327 | could be a list of strings in which case they are concatenated to |
| 328 | construct the base name." | ||
| 323 | (with-temp-buffer | 329 | (with-temp-buffer |
| 324 | (if (stringp string) | 330 | (if (stringp string) |
| 325 | (insert string) | 331 | (insert string) |
| @@ -352,60 +358,66 @@ they are concatenated to construct the base name." | |||
| 352 | (defun* mh-index-search (redo-search-flag folder search-regexp | 358 | (defun* mh-index-search (redo-search-flag folder search-regexp |
| 353 | &optional window-config) | 359 | &optional window-config) |
| 354 | "Perform an indexed search in an MH mail folder. | 360 | "Perform an indexed search in an MH mail folder. |
| 361 | |||
| 355 | Use a prefix argument to repeat the search. | 362 | Use a prefix argument to repeat the search. |
| 356 | 363 | ||
| 357 | Unlike regular searches, the prompt for the folder to search can be `all' to | 364 | Unlike regular searches, the prompt for the folder to search can be |
| 358 | search all folders; in addition, the search works recursively on the listed | 365 | `all' to search all folders; in addition, the search works recursively |
| 359 | folder. The search criteria are entered in an MH-Pick buffer as described in | 366 | on the listed folder. The search criteria are entered in an MH-Pick |
| 360 | `mh-search-folder'. | 367 | buffer as described in `mh-search-folder'. |
| 361 | 368 | ||
| 362 | To perform the search, type \\<mh-pick-mode-map>\\[mh-do-search]. Another | 369 | To perform the search, type \\<mh-pick-mode-map>\\[mh-do-search]. |
| 363 | difference from the regular searches is that because the search operates on | 370 | Another difference from the regular searches is that because the |
| 364 | more than one folder, the messages that are found are put in a temporary | 371 | search operates on more than one folder, the messages that are found |
| 365 | sub-folder of `+mhe-index' and are displayed in an MH-Folder buffer. This | 372 | are put in a temporary sub-folder of `+mhe-index' and are displayed in |
| 366 | buffer is special because it displays messages from multiple folders; each set | 373 | an MH-Folder buffer. This buffer is special because it displays |
| 367 | of messages from a given folder has a heading with the folder name. | 374 | messages from multiple folders; each set of messages from a given |
| 368 | 375 | folder has a heading with the folder name. | |
| 369 | In addition, the \\<mh-folder-mode-map>\\[mh-index-visit-folder] command can | 376 | |
| 370 | be used to visit the folder of the message at point. Initially, only the | 377 | In addition, the \\<mh-folder-mode-map>\\[mh-index-visit-folder] |
| 371 | messages that matched the search criteria are displayed in the folder. While | 378 | command can be used to visit the folder of the message at point. |
| 372 | the temporary buffer has its own set of message numbers, the actual messages | 379 | Initially, only the messages that matched the search criteria are |
| 373 | numbers are shown in the visited folder. Thus, the \\[mh-index-visit-folder] | 380 | displayed in the folder. While the temporary buffer has its own set of |
| 374 | command is useful to find the actual message number of an interesting message, | 381 | message numbers, the actual messages numbers are shown in the visited |
| 375 | or to view surrounding messages with the \\[mh-rescan-folder] command. | 382 | folder. Thus, the \\[mh-index-visit-folder] command is useful to find |
| 376 | 383 | the actual message number of an interesting message, or to view | |
| 377 | Because this folder is temporary, you'll probably get in the habit of killing | 384 | surrounding messages with the \\[mh-rescan-folder] command. |
| 378 | it when you're done with \\[mh-kill-folder]. | 385 | |
| 379 | 386 | Because this folder is temporary, you'll probably get in the habit of | |
| 380 | If you have run the \\[mh-search-folder] command, but change your mind while | 387 | killing it when you're done with \\[mh-kill-folder]. |
| 381 | entering the search criteria and actually want to run an indexed search, then | 388 | |
| 382 | you can use the \\<mh-pick-mode-map>\\[mh-index-do-search] command in the | 389 | If you have run the \\[mh-search-folder] command, but change your mind |
| 383 | MH-Pick buffer. | 390 | while entering the search criteria and actually want to run an indexed |
| 384 | 391 | search, then you can use the | |
| 385 | The \\<mh-folder-mode-map>\\[mh-index-search] command runs the command defined | 392 | \\<mh-pick-mode-map>\\[mh-index-do-search] command in the MH-Pick |
| 386 | by the `mh-index-program' option. The default value is \"Auto-detect\" which | 393 | buffer. |
| 387 | means that MH-E will automatically choose one of \"swish++\", \"swish-e\", | 394 | |
| 388 | \"mairix\", \"namazu\", \"pick\" and \"grep\" in that order. If, for example, | 395 | The \\<mh-folder-mode-map>\\[mh-index-search] command runs the command |
| 389 | you have both \"swish++\" and \"mairix\" installed and you want to use | 396 | defined by the `mh-index-program' option. The default value is |
| 390 | \"mairix\", then you can set this option to \"mairix\". | 397 | \"Auto-detect\" which means that MH-E will automatically choose one of |
| 398 | \"swish++\", \"swish-e\", \"mairix\", \"namazu\", \"pick\" and | ||
| 399 | \"grep\" in that order. If, for example, you have both \"swish++\" and | ||
| 400 | \"mairix\" installed and you want to use \"mairix\", then you can set | ||
| 401 | this option to \"mairix\". | ||
| 391 | 402 | ||
| 392 | *NOTE* | 403 | *NOTE* |
| 393 | 404 | ||
| 394 | The \"pick\" and \"grep\" commands do not perform a recursive search on | 405 | The \"pick\" and \"grep\" commands do not perform a |
| 395 | the given folder. | 406 | recursive search on the given folder. |
| 396 | 407 | ||
| 397 | This command uses an \"X-MHE-Checksum:\" header field to cache the MD5 | 408 | This command uses an \"X-MHE-Checksum:\" header field to cache |
| 398 | checksum of a message. This means that if an incoming message already contains | 409 | the MD5 checksum of a message. This means that if an incoming |
| 399 | an \"X-MHE-Checksum:\" field, that message might not be found by this command. | 410 | message already contains an \"X-MHE-Checksum:\" field, that |
| 400 | The following \"procmail\" recipe avoids this problem by renaming the existing | 411 | message might not be found by this command. The following |
| 412 | \"procmail\" recipe avoids this problem by renaming the existing | ||
| 401 | header field: | 413 | header field: |
| 402 | 414 | ||
| 403 | :0 wf | 415 | :0 wf |
| 404 | | formail -R \"X-MHE-Checksum\" \"X-Old-MHE-Checksum\" | 416 | | formail -R \"X-MHE-Checksum\" \"X-Old-MHE-Checksum\" |
| 405 | 417 | ||
| 406 | The documentation for the following commands describe how to set up the | 418 | The documentation for the following commands describe how to set |
| 407 | various indexing programs to use with MH-E. The \"pick\" and \"grep\" commands | 419 | up the various indexing programs to use with MH-E. The \"pick\" |
| 408 | do not require additional configuration. | 420 | and \"grep\" commands do not require additional configuration. |
| 409 | 421 | ||
| 410 | - `mh-swish++-execute-search' | 422 | - `mh-swish++-execute-search' |
| 411 | - `mh-swish-execute-search' | 423 | - `mh-swish-execute-search' |
| @@ -414,12 +426,14 @@ do not require additional configuration. | |||
| 414 | - `mh-pick-execute-search' | 426 | - `mh-pick-execute-search' |
| 415 | - `mh-grep-execute-search' | 427 | - `mh-grep-execute-search' |
| 416 | 428 | ||
| 417 | In a program, if REDO-SEARCH-FLAG is non-nil and the current folder buffer was | 429 | In a program, if REDO-SEARCH-FLAG is non-nil and the current |
| 418 | generated by a index search, then the search is repeated. Otherwise, FOLDER is | 430 | folder buffer was generated by a index search, then the search is |
| 419 | searched with SEARCH-REGEXP and the results are presented in an MH-E folder. | 431 | repeated. Otherwise, FOLDER is searched with SEARCH-REGEXP and |
| 420 | If FOLDER is \"+\" then mail in all folders are searched. Optional argument | 432 | the results are presented in an MH-E folder. If FOLDER is \"+\" |
| 421 | WINDOW-CONFIG stores the window configuration that will be restored after the | 433 | then mail in all folders are searched. Optional argument |
| 422 | user quits the folder containing the index search results." | 434 | WINDOW-CONFIG stores the window configuration that will be |
| 435 | restored after the user quits the folder containing the index | ||
| 436 | search results." | ||
| 423 | (interactive | 437 | (interactive |
| 424 | (list current-prefix-arg | 438 | (list current-prefix-arg |
| 425 | (progn | 439 | (progn |
| @@ -585,7 +599,8 @@ user quits the folder containing the index search results." | |||
| 585 | 599 | ||
| 586 | (defun mh-index-write-hashtable (table proc) | 600 | (defun mh-index-write-hashtable (table proc) |
| 587 | "Write TABLE to `current-buffer'. | 601 | "Write TABLE to `current-buffer'. |
| 588 | PROC is used to serialize the values corresponding to the hash table keys." | 602 | PROC is used to serialize the values corresponding to the hash |
| 603 | table keys." | ||
| 589 | (pp (loop for x being the hash-keys of table | 604 | (pp (loop for x being the hash-keys of table |
| 590 | collect (cons x (funcall proc (gethash x table)))) | 605 | collect (cons x (funcall proc (gethash x table)))) |
| 591 | (current-buffer)) | 606 | (current-buffer)) |
| @@ -619,8 +634,9 @@ PROC is used to convert the value to actual data." | |||
| 619 | ;;;###mh-autoload | 634 | ;;;###mh-autoload |
| 620 | (defun mh-index-parse-search-regexp (input-string) | 635 | (defun mh-index-parse-search-regexp (input-string) |
| 621 | "Construct parse tree for INPUT-STRING. | 636 | "Construct parse tree for INPUT-STRING. |
| 622 | All occurrences of &, |, ! and ~ in INPUT-STRING are replaced by AND, OR and | 637 | All occurrences of &, |, ! and ~ in INPUT-STRING are replaced by |
| 623 | NOT as appropriate. Then the resulting string is parsed." | 638 | AND, OR and NOT as appropriate. Then the resulting string is |
| 639 | parsed." | ||
| 624 | (let (input) | 640 | (let (input) |
| 625 | (with-temp-buffer | 641 | (with-temp-buffer |
| 626 | (insert input-string) | 642 | (insert input-string) |
| @@ -720,9 +736,10 @@ NOT as appropriate. Then the resulting string is parsed." | |||
| 720 | ;;;###mh-autoload | 736 | ;;;###mh-autoload |
| 721 | (defun mh-index-next-folder (&optional backward-flag) | 737 | (defun mh-index-next-folder (&optional backward-flag) |
| 722 | "Jump to the next folder marker. | 738 | "Jump to the next folder marker. |
| 723 | The function is only applicable to folders displaying index search results. | 739 | The function is only applicable to folders displaying index search |
| 724 | With non-nil optional argument BACKWARD-FLAG, jump to the previous group of | 740 | results. |
| 725 | results." | 741 | With non-nil optional argument BACKWARD-FLAG, jump to the previous |
| 742 | group of results." | ||
| 726 | (interactive "P") | 743 | (interactive "P") |
| 727 | (if (null mh-index-data) | 744 | (if (null mh-index-data) |
| 728 | (message "Only applicable in an MH-E index search buffer") | 745 | (message "Only applicable in an MH-E index search buffer") |
| @@ -764,12 +781,12 @@ results." | |||
| 764 | (defun mh-index-new-folder (name search-regexp) | 781 | (defun mh-index-new-folder (name search-regexp) |
| 765 | "Return a folder name based on NAME for search results of SEARCH-REGEXP. | 782 | "Return a folder name based on NAME for search results of SEARCH-REGEXP. |
| 766 | 783 | ||
| 767 | If folder NAME already exists and was generated for the same SEARCH-REGEXP | 784 | If folder NAME already exists and was generated for the same |
| 768 | then it is reused. | 785 | SEARCH-REGEXP then it is reused. |
| 769 | 786 | ||
| 770 | Otherwise if the folder NAME was generated from a different search then check | 787 | Otherwise if the folder NAME was generated from a different |
| 771 | if NAME<2> can be used. Otherwise try NAME<3>. This is repeated till we find a | 788 | search then check if NAME<2> can be used. Otherwise try NAME<3>. |
| 772 | new folder name. | 789 | This is repeated till we find a new folder name. |
| 773 | 790 | ||
| 774 | If the folder returned doesn't exist then it is created." | 791 | If the folder returned doesn't exist then it is created." |
| 775 | (unless (mh-folder-name-p name) | 792 | (unless (mh-folder-name-p name) |
| @@ -794,7 +811,8 @@ If the folder returned doesn't exist then it is created." | |||
| 794 | 811 | ||
| 795 | (defun mh-index-folder-search-regexp (folder) | 812 | (defun mh-index-folder-search-regexp (folder) |
| 796 | "If FOLDER was created by a index search, return the search regexp. | 813 | "If FOLDER was created by a index search, return the search regexp. |
| 797 | Return nil if FOLDER doesn't exist or the .mhe_index file is garbled." | 814 | Return nil if FOLDER doesn't exist or the .mhe_index file is |
| 815 | garbled." | ||
| 798 | (ignore-errors | 816 | (ignore-errors |
| 799 | (with-temp-buffer | 817 | (with-temp-buffer |
| 800 | (insert-file-contents | 818 | (insert-file-contents |
| @@ -844,8 +862,8 @@ Return nil if FOLDER doesn't exist or the .mhe_index file is garbled." | |||
| 844 | ;;;###mh-autoload | 862 | ;;;###mh-autoload |
| 845 | (defun mh-index-group-by-folder () | 863 | (defun mh-index-group-by-folder () |
| 846 | "Partition the messages based on source folder. | 864 | "Partition the messages based on source folder. |
| 847 | Returns an alist with the the folder names in the car and the cdr being the | 865 | Returns an alist with the the folder names in the car and the cdr |
| 848 | list of messages originally from that folder." | 866 | being the list of messages originally from that folder." |
| 849 | (save-excursion | 867 | (save-excursion |
| 850 | (goto-char (point-min)) | 868 | (goto-char (point-min)) |
| 851 | (let ((result-table (make-hash-table :test #'equal))) | 869 | (let ((result-table (make-hash-table :test #'equal))) |
| @@ -909,9 +927,9 @@ list of messages originally from that folder." | |||
| 909 | 927 | ||
| 910 | (defun mh-index-matching-source-msgs (msgs &optional delete-from-index-data) | 928 | (defun mh-index-matching-source-msgs (msgs &optional delete-from-index-data) |
| 911 | "Return a table of original messages and folders for messages in MSGS. | 929 | "Return a table of original messages and folders for messages in MSGS. |
| 912 | If optional argument DELETE-FROM-INDEX-DATA is non-nil, then each of the | 930 | If optional argument DELETE-FROM-INDEX-DATA is non-nil, then each |
| 913 | messages, whose counter-part is found in some source folder, is removed from | 931 | of the messages, whose counter-part is found in some source |
| 914 | `mh-index-data'." | 932 | folder, is removed from `mh-index-data'." |
| 915 | (let ((table (make-hash-table :test #'equal))) | 933 | (let ((table (make-hash-table :test #'equal))) |
| 916 | (dolist (msg msgs) | 934 | (dolist (msg msgs) |
| 917 | (let* ((checksum (gethash msg mh-index-msg-checksum-map)) | 935 | (let* ((checksum (gethash msg mh-index-msg-checksum-map)) |
| @@ -926,9 +944,10 @@ messages, whose counter-part is found in some source folder, is removed from | |||
| 926 | ;;;###mh-autoload | 944 | ;;;###mh-autoload |
| 927 | (defun mh-index-execute-commands () | 945 | (defun mh-index-execute-commands () |
| 928 | "Delete/refile the actual messages. | 946 | "Delete/refile the actual messages. |
| 929 | The copies in the searched folder are then deleted/refiled to get the desired | 947 | The copies in the searched folder are then deleted/refiled to get |
| 930 | result. Before deleting the messages we make sure that the message being | 948 | the desired result. Before deleting the messages we make sure |
| 931 | deleted is identical to the one that the user has marked in the index buffer." | 949 | that the message being deleted is identical to the one that the |
| 950 | user has marked in the index buffer." | ||
| 932 | (save-excursion | 951 | (save-excursion |
| 933 | (let ((folders ()) | 952 | (let ((folders ()) |
| 934 | (mh-speed-flists-inhibit-flag t)) | 953 | (mh-speed-flists-inhibit-flag t)) |
| @@ -967,8 +986,8 @@ deleted is identical to the one that the user has marked in the index buffer." | |||
| 967 | ;;;###mh-autoload | 986 | ;;;###mh-autoload |
| 968 | (defun mh-index-add-to-sequence (seq msgs) | 987 | (defun mh-index-add-to-sequence (seq msgs) |
| 969 | "Add to SEQ the messages in the list MSGS. | 988 | "Add to SEQ the messages in the list MSGS. |
| 970 | This function updates the source folder sequences. Also makes an attempt to | 989 | This function updates the source folder sequences. Also makes an |
| 971 | update the source folder buffer if we have it open." | 990 | attempt to update the source folder buffer if we have it open." |
| 972 | ;; Don't need to do anything for cur | 991 | ;; Don't need to do anything for cur |
| 973 | (save-excursion | 992 | (save-excursion |
| 974 | (when (and (not (memq seq (mh-unpropagated-sequences))) | 993 | (when (and (not (memq seq (mh-unpropagated-sequences))) |
| @@ -993,8 +1012,8 @@ update the source folder buffer if we have it open." | |||
| 993 | ;;;###mh-autoload | 1012 | ;;;###mh-autoload |
| 994 | (defun mh-index-delete-from-sequence (seq msgs) | 1013 | (defun mh-index-delete-from-sequence (seq msgs) |
| 995 | "Delete from SEQ the messages in MSGS. | 1014 | "Delete from SEQ the messages in MSGS. |
| 996 | This function updates the source folder sequences. Also makes an attempt to | 1015 | This function updates the source folder sequences. Also makes an |
| 997 | update the source folder buffer if present." | 1016 | attempt to update the source folder buffer if present." |
| 998 | (save-excursion | 1017 | (save-excursion |
| 999 | (when (and (not (memq seq (mh-unpropagated-sequences))) | 1018 | (when (and (not (memq seq (mh-unpropagated-sequences))) |
| 1000 | (mh-valid-seq-p seq)) | 1019 | (mh-valid-seq-p seq)) |
| @@ -1025,12 +1044,12 @@ update the source folder buffer if present." | |||
| 1025 | (defun mh-pick-execute-search (folder-path search-regexp) | 1044 | (defun mh-pick-execute-search (folder-path search-regexp) |
| 1026 | "Execute pick. | 1045 | "Execute pick. |
| 1027 | 1046 | ||
| 1028 | Unlike the other index search programs \"pick\" only searches messages present | 1047 | Unlike the other index search programs \"pick\" only searches |
| 1029 | in the folder itself and does not descend into any sub-folders that may be | 1048 | messages present in the folder itself and does not descend into |
| 1030 | present. | 1049 | any sub-folders that may be present. |
| 1031 | 1050 | ||
| 1032 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used | 1051 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP |
| 1033 | to search." | 1052 | is used to search." |
| 1034 | (set-buffer (get-buffer-create mh-index-temp-buffer)) | 1053 | (set-buffer (get-buffer-create mh-index-temp-buffer)) |
| 1035 | (erase-buffer) | 1054 | (erase-buffer) |
| 1036 | (setq mh-index-pick-folder | 1055 | (setq mh-index-pick-folder |
| @@ -1061,12 +1080,12 @@ to search." | |||
| 1061 | (defun mh-grep-execute-search (folder-path search-regexp) | 1080 | (defun mh-grep-execute-search (folder-path search-regexp) |
| 1062 | "Execute grep and read the results. | 1081 | "Execute grep and read the results. |
| 1063 | 1082 | ||
| 1064 | Unlike the other index search programs \"grep\" only searches messages present | 1083 | Unlike the other index search programs \"grep\" only searches |
| 1065 | in the folder itself and does not descend into any sub-folders that may be | 1084 | messages present in the folder itself and does not descend into |
| 1066 | present. | 1085 | any sub-folders that may be present. |
| 1067 | 1086 | ||
| 1068 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used | 1087 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP |
| 1069 | to search." | 1088 | is used to search." |
| 1070 | (set-buffer (get-buffer-create mh-index-temp-buffer)) | 1089 | (set-buffer (get-buffer-create mh-index-temp-buffer)) |
| 1071 | (erase-buffer) | 1090 | (erase-buffer) |
| 1072 | (call-process mh-grep-binary nil '(t nil) nil | 1091 | (call-process mh-grep-binary nil '(t nil) nil |
| @@ -1075,9 +1094,9 @@ to search." | |||
| 1075 | 1094 | ||
| 1076 | (defun mh-grep-next-result () | 1095 | (defun mh-grep-next-result () |
| 1077 | "Read the next result. | 1096 | "Read the next result. |
| 1078 | Parse it and return the message folder, message index and the match. If no | 1097 | Parse it and return the message folder, message index and the |
| 1079 | other matches left then return nil. If the current record is invalid return | 1098 | match. If no other matches left then return nil. If the current |
| 1080 | 'error." | 1099 | record is invalid return 'error." |
| 1081 | (prog1 | 1100 | (prog1 |
| 1082 | (block nil | 1101 | (block nil |
| 1083 | (when (eobp) | 1102 | (when (eobp) |
| @@ -1118,11 +1137,12 @@ other matches left then return nil. If the current record is invalid return | |||
| 1118 | (defun mh-mairix-execute-search (folder-path search-regexp-list) | 1137 | (defun mh-mairix-execute-search (folder-path search-regexp-list) |
| 1119 | "Execute mairix and read the results. | 1138 | "Execute mairix and read the results. |
| 1120 | 1139 | ||
| 1121 | In the examples below, replace \"/home/user/Mail\" with the path to your MH | 1140 | In the examples below, replace \"/home/user/Mail\" with the path |
| 1122 | directory. | 1141 | to your MH directory. |
| 1123 | 1142 | ||
| 1124 | First create the directory \"/home/user/Mail/.mairix\". Then create the file | 1143 | First create the directory \"/home/user/Mail/.mairix\". Then |
| 1125 | \"/home/user/Mail/.mairix/config\" with the following contents: | 1144 | create the file \"/home/user/Mail/.mairix/config\" with the |
| 1145 | following contents: | ||
| 1126 | 1146 | ||
| 1127 | base=/home/user/Mail | 1147 | base=/home/user/Mail |
| 1128 | 1148 | ||
| @@ -1133,13 +1153,13 @@ First create the directory \"/home/user/Mail/.mairix\". Then create the file | |||
| 1133 | vfolder_format=raw | 1153 | vfolder_format=raw |
| 1134 | database=/home/user/Mail/mairix/database | 1154 | database=/home/user/Mail/mairix/database |
| 1135 | 1155 | ||
| 1136 | Use the following command line to generate the mairix index. Run this daily | 1156 | Use the following command line to generate the mairix index. Run |
| 1137 | from cron: | 1157 | this daily from cron: |
| 1138 | 1158 | ||
| 1139 | mairix -f /home/user/Mail/.mairix/config | 1159 | mairix -f /home/user/Mail/.mairix/config |
| 1140 | 1160 | ||
| 1141 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP-LIST is used | 1161 | In a program, FOLDER-PATH is the directory in which |
| 1142 | to search." | 1162 | SEARCH-REGEXP-LIST is used to search." |
| 1143 | (set-buffer (get-buffer-create mh-index-temp-buffer)) | 1163 | (set-buffer (get-buffer-create mh-index-temp-buffer)) |
| 1144 | (erase-buffer) | 1164 | (erase-buffer) |
| 1145 | (unless mh-mairix-binary | 1165 | (unless mh-mairix-binary |
| @@ -1258,9 +1278,10 @@ REGEXP-LIST is an alist of fields and values." | |||
| 1258 | 1278 | ||
| 1259 | (defun mh-flists-execute (&rest args) | 1279 | (defun mh-flists-execute (&rest args) |
| 1260 | "Execute flists. | 1280 | "Execute flists. |
| 1261 | Search for messages belonging to `mh-flists-sequence' in the folders | 1281 | Search for messages belonging to `mh-flists-sequence' in the |
| 1262 | specified by `mh-flists-search-folders'. If `mh-recursive-folders-flag' is t, | 1282 | folders specified by `mh-flists-search-folders'. If |
| 1263 | then the folders are searched recursively. All parameters ARGS are ignored." | 1283 | `mh-recursive-folders-flag' is t, then the folders are searched |
| 1284 | recursively. All parameters ARGS are ignored." | ||
| 1264 | (set-buffer (get-buffer-create mh-index-temp-buffer)) | 1285 | (set-buffer (get-buffer-create mh-index-temp-buffer)) |
| 1265 | (erase-buffer) | 1286 | (erase-buffer) |
| 1266 | (unless (executable-find "sh") | 1287 | (unless (executable-find "sh") |
| @@ -1286,8 +1307,9 @@ then the folders are searched recursively. All parameters ARGS are ignored." | |||
| 1286 | (defun mh-index-sequenced-messages (folders sequence) | 1307 | (defun mh-index-sequenced-messages (folders sequence) |
| 1287 | "Display messages from FOLDERS in SEQUENCE. | 1308 | "Display messages from FOLDERS in SEQUENCE. |
| 1288 | All messages in the sequence you provide from the folders in | 1309 | All messages in the sequence you provide from the folders in |
| 1289 | `mh-new-messages-folders' are listed. With a prefix argument, enter a | 1310 | `mh-new-messages-folders' are listed. With a prefix argument, |
| 1290 | space-separated list of folders, or nothing to search all folders." | 1311 | enter a space-separated list of folders, or nothing to search all |
| 1312 | folders." | ||
| 1291 | (interactive | 1313 | (interactive |
| 1292 | (list (if current-prefix-arg | 1314 | (list (if current-prefix-arg |
| 1293 | (split-string (read-string "Search folder(s) (default all): ")) | 1315 | (split-string (read-string "Search folder(s) (default all): ")) |
| @@ -1330,13 +1352,14 @@ space-separated list of folders, or nothing to search all folders." | |||
| 1330 | (defun mh-index-new-messages (folders) | 1352 | (defun mh-index-new-messages (folders) |
| 1331 | "Display unseen messages. | 1353 | "Display unseen messages. |
| 1332 | 1354 | ||
| 1333 | If you use a program such as `procmail' to use `rcvstore' to file your | 1355 | If you use a program such as `procmail' to use `rcvstore' to file |
| 1334 | incoming mail automatically, you can display new, unseen, messages using this | 1356 | your incoming mail automatically, you can display new, unseen, |
| 1335 | command. All messages in the `unseen' sequence from the folders in | 1357 | messages using this command. All messages in the `unseen' |
| 1336 | `mh-new-messages-folders' are listed. | 1358 | sequence from the folders in `mh-new-messages-folders' are |
| 1359 | listed. | ||
| 1337 | 1360 | ||
| 1338 | With a prefix argument, enter a space-separated list of FOLDERS, or nothing to | 1361 | With a prefix argument, enter a space-separated list of FOLDERS, |
| 1339 | search all folders." | 1362 | or nothing to search all folders." |
| 1340 | (interactive | 1363 | (interactive |
| 1341 | (list (if current-prefix-arg | 1364 | (list (if current-prefix-arg |
| 1342 | (split-string (read-string "Search folder(s) (default all): ")) | 1365 | (split-string (read-string "Search folder(s) (default all): ")) |
| @@ -1347,11 +1370,11 @@ search all folders." | |||
| 1347 | (defun mh-index-ticked-messages (folders) | 1370 | (defun mh-index-ticked-messages (folders) |
| 1348 | "Display ticked messages. | 1371 | "Display ticked messages. |
| 1349 | 1372 | ||
| 1350 | All messages in `mh-tick-seq' from the folders in `mh-ticked-messages-folders' | 1373 | All messages in `mh-tick-seq' from the folders in |
| 1351 | are listed. | 1374 | `mh-ticked-messages-folders' are listed. |
| 1352 | 1375 | ||
| 1353 | With a prefix argument, enter a space-separated list of FOLDERS, or nothing to | 1376 | With a prefix argument, enter a space-separated list of FOLDERS, |
| 1354 | search all folders." | 1377 | or nothing to search all folders." |
| 1355 | (interactive | 1378 | (interactive |
| 1356 | (list (if current-prefix-arg | 1379 | (list (if current-prefix-arg |
| 1357 | (split-string (read-string "Search folder(s) (default all): ")) | 1380 | (split-string (read-string "Search folder(s) (default all): ")) |
| @@ -1370,11 +1393,12 @@ search all folders." | |||
| 1370 | (defun mh-swish-execute-search (folder-path search-regexp) | 1393 | (defun mh-swish-execute-search (folder-path search-regexp) |
| 1371 | "Execute swish-e and read the results. | 1394 | "Execute swish-e and read the results. |
| 1372 | 1395 | ||
| 1373 | In the examples below, replace \"/home/user/Mail\" with the path to your | 1396 | In the examples below, replace \"/home/user/Mail\" with the path |
| 1374 | MH directory. | 1397 | to your MH directory. |
| 1375 | 1398 | ||
| 1376 | First create the directory \"/home/user/Mail/.swish\". Then create the file | 1399 | First create the directory \"/home/user/Mail/.swish\". Then |
| 1377 | \"/home/user/Mail/.swish/config\" with the following contents: | 1400 | create the file \"/home/user/Mail/.swish/config\" with the |
| 1401 | following contents: | ||
| 1378 | 1402 | ||
| 1379 | DefaultContents TXT* | 1403 | DefaultContents TXT* |
| 1380 | IndexDir /home/user/Mail | 1404 | IndexDir /home/user/Mail |
| @@ -1397,22 +1421,22 @@ First create the directory \"/home/user/Mail/.swish\". Then create the file | |||
| 1397 | FileRules pathname contains /home/user/Mail/.swish | 1421 | FileRules pathname contains /home/user/Mail/.swish |
| 1398 | FileRules pathname contains /home/user/Mail/mhe-index | 1422 | FileRules pathname contains /home/user/Mail/mhe-index |
| 1399 | 1423 | ||
| 1400 | This configuration does not index the folders that hold the results of your | 1424 | This configuration does not index the folders that hold the |
| 1401 | searches in \"+mhe-index\" since they tend to be ephemeral and the original | 1425 | results of your searches in \"+mhe-index\" since they tend to be |
| 1402 | messages are indexed anyway. | 1426 | ephemeral and the original messages are indexed anyway. |
| 1403 | 1427 | ||
| 1404 | If there are any directories you would like to ignore, append lines like the | 1428 | If there are any directories you would like to ignore, append |
| 1405 | following to \"config\": | 1429 | lines like the following to \"config\": |
| 1406 | 1430 | ||
| 1407 | FileRules pathname contains /home/user/Mail/scripts | 1431 | FileRules pathname contains /home/user/Mail/scripts |
| 1408 | 1432 | ||
| 1409 | Use the following command line to generate the swish index. Run this daily | 1433 | Use the following command line to generate the swish index. Run |
| 1410 | from cron: | 1434 | this daily from cron: |
| 1411 | 1435 | ||
| 1412 | swish-e -c /home/user/Mail/.swish/config | 1436 | swish-e -c /home/user/Mail/.swish/config |
| 1413 | 1437 | ||
| 1414 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to | 1438 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP |
| 1415 | search." | 1439 | is used to search." |
| 1416 | (set-buffer (get-buffer-create mh-index-temp-buffer)) | 1440 | (set-buffer (get-buffer-create mh-index-temp-buffer)) |
| 1417 | (erase-buffer) | 1441 | (erase-buffer) |
| 1418 | (unless mh-swish-binary | 1442 | (unless mh-swish-binary |
| @@ -1472,11 +1496,12 @@ search." | |||
| 1472 | (defun mh-swish++-execute-search (folder-path search-regexp) | 1496 | (defun mh-swish++-execute-search (folder-path search-regexp) |
| 1473 | "Execute swish++ and read the results. | 1497 | "Execute swish++ and read the results. |
| 1474 | 1498 | ||
| 1475 | In the examples below, replace \"/home/user/Mail\" with the path to your MH | 1499 | In the examples below, replace \"/home/user/Mail\" with the path to |
| 1476 | directory. | 1500 | your MH directory. |
| 1477 | 1501 | ||
| 1478 | First create the directory \"/home/user/Mail/.swish++\". Then create the file | 1502 | First create the directory \"/home/user/Mail/.swish++\". Then create |
| 1479 | \"/home/user/Mail/.swish++/swish++.conf\" with the following contents: | 1503 | the file \"/home/user/Mail/.swish++/swish++.conf\" with the following |
| 1504 | contents: | ||
| 1480 | 1505 | ||
| 1481 | IncludeMeta Bcc Cc Comments Content-Description From Keywords | 1506 | IncludeMeta Bcc Cc Comments Content-Description From Keywords |
| 1482 | IncludeMeta Newsgroups Resent-To Subject To | 1507 | IncludeMeta Newsgroups Resent-To Subject To |
| @@ -1484,23 +1509,23 @@ First create the directory \"/home/user/Mail/.swish++\". Then create the file | |||
| 1484 | IncludeFile Mail * | 1509 | IncludeFile Mail * |
| 1485 | IndexFile /home/user/Mail/.swish++/swish++.index | 1510 | IndexFile /home/user/Mail/.swish++/swish++.index |
| 1486 | 1511 | ||
| 1487 | Use the following command line to generate the swish index. Run this daily | 1512 | Use the following command line to generate the swish index. Run |
| 1488 | from cron: | 1513 | this daily from cron: |
| 1489 | 1514 | ||
| 1490 | find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ | 1515 | find /home/user/Mail -path /home/user/Mail/mhe-index -prune \\ |
| 1491 | -o -path /home/user/Mail/.swish++ -prune \\ | 1516 | -o -path /home/user/Mail/.swish++ -prune \\ |
| 1492 | -o -name \"[0-9]*\" -print \\ | 1517 | -o -name \"[0-9]*\" -print \\ |
| 1493 | | index -c /home/user/Mail/.swish++/swish++.conf - | 1518 | | index -c /home/user/Mail/.swish++/swish++.conf - |
| 1494 | 1519 | ||
| 1495 | This command does not index the folders that hold the results of your searches | 1520 | This command does not index the folders that hold the results of your |
| 1496 | in \"+mhe-index\" since they tend to be ephemeral and the original messages | 1521 | searches in \"+mhe-index\" since they tend to be ephemeral and the |
| 1497 | are indexed anyway. | 1522 | original messages are indexed anyway. |
| 1498 | 1523 | ||
| 1499 | On some systems (Debian GNU/Linux, for example), use \"index++\" instead of | 1524 | On some systems (Debian GNU/Linux, for example), use \"index++\" |
| 1500 | \"index\". | 1525 | instead of \"index\". |
| 1501 | 1526 | ||
| 1502 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to | 1527 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is |
| 1503 | search." | 1528 | used to search." |
| 1504 | (set-buffer (get-buffer-create mh-index-temp-buffer)) | 1529 | (set-buffer (get-buffer-create mh-index-temp-buffer)) |
| 1505 | (erase-buffer) | 1530 | (erase-buffer) |
| 1506 | (unless mh-swish++-binary | 1531 | (unless mh-swish++-binary |
| @@ -1554,29 +1579,30 @@ REGEXP-LIST is an alist of fields and values." | |||
| 1554 | (defun mh-namazu-execute-search (folder-path search-regexp) | 1579 | (defun mh-namazu-execute-search (folder-path search-regexp) |
| 1555 | "Execute namazu and read the results. | 1580 | "Execute namazu and read the results. |
| 1556 | 1581 | ||
| 1557 | In the examples below, replace \"/home/user/Mail\" with the path to your MH | 1582 | In the examples below, replace \"/home/user/Mail\" with the path to |
| 1558 | directory. | 1583 | your MH directory. |
| 1559 | 1584 | ||
| 1560 | First create the directory \"/home/user/Mail/.namazu\". Then create the file | 1585 | First create the directory \"/home/user/Mail/.namazu\". Then create |
| 1561 | \"/home/user/Mail/.namazu/mknmzrc\" with the following contents: | 1586 | the file \"/home/user/Mail/.namazu/mknmzrc\" with the following |
| 1587 | contents: | ||
| 1562 | 1588 | ||
| 1563 | package conf; # Don't remove this line! | 1589 | package conf; # Don't remove this line! |
| 1564 | $ADDRESS = 'user@localhost'; | 1590 | $ADDRESS = 'user@localhost'; |
| 1565 | $ALLOW_FILE = \"[0-9]*\"; | 1591 | $ALLOW_FILE = \"[0-9]*\"; |
| 1566 | $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; | 1592 | $EXCLUDE_PATH = \"^/home/user/Mail/(mhe-index|spam)\"; |
| 1567 | 1593 | ||
| 1568 | This configuration does not index the folders that hold the results of your | 1594 | This configuration does not index the folders that hold the results of |
| 1569 | searches in \"+mhe-index\" since they tend to be ephemeral and the original | 1595 | your searches in \"+mhe-index\" since they tend to be ephemeral and |
| 1570 | messages are indexed anyway. | 1596 | the original messages are indexed anyway. |
| 1571 | 1597 | ||
| 1572 | Use the following command line to generate the namazu index. Run this daily | 1598 | Use the following command line to generate the namazu index. Run this |
| 1573 | from cron: | 1599 | daily from cron: |
| 1574 | 1600 | ||
| 1575 | mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ | 1601 | mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \\ |
| 1576 | /home/user/Mail | 1602 | /home/user/Mail |
| 1577 | 1603 | ||
| 1578 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is used to | 1604 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP |
| 1579 | search." | 1605 | is used to search." |
| 1580 | (let ((namazu-index-directory | 1606 | (let ((namazu-index-directory |
| 1581 | (format "%s%s" mh-user-path mh-namazu-directory))) | 1607 | (format "%s%s" mh-user-path mh-namazu-directory))) |
| 1582 | (unless (file-exists-p namazu-index-directory) | 1608 | (unless (file-exists-p namazu-index-directory) |
| @@ -1623,10 +1649,10 @@ search." | |||
| 1623 | ;;;###mh-autoload | 1649 | ;;;###mh-autoload |
| 1624 | (defun mh-index-choose () | 1650 | (defun mh-index-choose () |
| 1625 | "Choose an indexing function. | 1651 | "Choose an indexing function. |
| 1626 | The side-effects of this function are that the variables `mh-indexer', | 1652 | The side-effects of this function are that the variables |
| 1627 | `mh-index-execute-search-function', and `mh-index-next-result-function' are | 1653 | `mh-indexer', `mh-index-execute-search-function', and |
| 1628 | set according to the first indexer in `mh-indexer-choices' present on the | 1654 | `mh-index-next-result-function' are set according to the first |
| 1629 | system." | 1655 | indexer in `mh-indexer-choices' present on the system." |
| 1630 | (block nil | 1656 | (block nil |
| 1631 | ;; The following favors the user's preference; otherwise, the last | 1657 | ;; The following favors the user's preference; otherwise, the last |
| 1632 | ;; automatically chosen indexer is used for efficiency rather than going | 1658 | ;; automatically chosen indexer is used for efficiency rather than going |
diff --git a/lisp/mh-e/mh-init.el b/lisp/mh-e/mh-init.el index 1bafe960eff..7b8477a4a94 100644 --- a/lisp/mh-e/mh-init.el +++ b/lisp/mh-e/mh-init.el | |||
| @@ -81,8 +81,8 @@ Created by the function `mh-variants'") | |||
| 81 | (defun mh-variants () | 81 | (defun mh-variants () |
| 82 | "Return a list of installed variants of MH on the system. | 82 | "Return a list of installed variants of MH on the system. |
| 83 | This function looks for MH in `mh-sys-path', `mh-path' and | 83 | This function looks for MH in `mh-sys-path', `mh-path' and |
| 84 | `exec-path'. The format of the list of variants that is returned is described | 84 | `exec-path'. The format of the list of variants that is returned |
| 85 | by the variable `mh-variants'." | 85 | is described by the variable `mh-variants'." |
| 86 | (if mh-variants | 86 | (if mh-variants |
| 87 | mh-variants | 87 | mh-variants |
| 88 | (let ((list-unique)) | 88 | (let ((list-unique)) |
| @@ -100,14 +100,16 @@ by the variable `mh-variants'." | |||
| 100 | 100 | ||
| 101 | (defvar mh-variant-in-use nil | 101 | (defvar mh-variant-in-use nil |
| 102 | "The MH variant currently in use; a string with variant and version number. | 102 | "The MH variant currently in use; a string with variant and version number. |
| 103 | This differs from `mh-variant' when the latter is set to `autodetect'.") | 103 | This differs from `mh-variant' when the latter is set to |
| 104 | `autodetect'.") | ||
| 104 | 105 | ||
| 105 | ;;;###mh-autoload | 106 | ;;;###mh-autoload |
| 106 | (defun mh-variant-set (variant) | 107 | (defun mh-variant-set (variant) |
| 107 | "Set the MH variant to VARIANT. | 108 | "Set the MH variant to VARIANT. |
| 108 | Sets `mh-progs', `mh-lib', `mh-lib-progs' and `mh-flists-present-flag'. | 109 | Sets `mh-progs', `mh-lib', `mh-lib-progs' and |
| 109 | If the VARIANT is `autodetect', then first try nmh, then MH and finally | 110 | `mh-flists-present-flag'. |
| 110 | GNU mailutils." | 111 | If the VARIANT is `autodetect', then first try nmh, then MH and |
| 112 | finally GNU mailutils." | ||
| 111 | (interactive | 113 | (interactive |
| 112 | (list (completing-read | 114 | (list (completing-read |
| 113 | "MH Variant: " | 115 | "MH Variant: " |
| @@ -138,7 +140,8 @@ GNU mailutils." | |||
| 138 | (defun mh-variant-set-variant (variant) | 140 | (defun mh-variant-set-variant (variant) |
| 139 | "Setup the system variables for the MH variant named VARIANT. | 141 | "Setup the system variables for the MH variant named VARIANT. |
| 140 | If VARIANT is a string, use that key in the variable `mh-variants'. | 142 | If VARIANT is a string, use that key in the variable `mh-variants'. |
| 141 | If VARIANT is a symbol, select the first entry that matches that variant." | 143 | If VARIANT is a symbol, select the first entry that matches that |
| 144 | variant." | ||
| 142 | (cond | 145 | (cond |
| 143 | ((stringp variant) ;e.g. "nmh 1.1-RC1" | 146 | ((stringp variant) ;e.g. "nmh 1.1-RC1" |
| 144 | (when (assoc variant mh-variants) | 147 | (when (assoc variant mh-variants) |
| @@ -193,7 +196,7 @@ Currently known variants are 'MH, 'nmh, and 'mu-mh." | |||
| 193 | "/usr/bin/mu-mh/") ; GNU mailutils - packaged | 196 | "/usr/bin/mu-mh/") ; GNU mailutils - packaged |
| 194 | "List of directories to search for variants of the MH variant. | 197 | "List of directories to search for variants of the MH variant. |
| 195 | The list `exec-path' is searched in addition to this list. | 198 | The list `exec-path' is searched in addition to this list. |
| 196 | There's no need for users to modify this list. Instead add extra | 199 | There's no need for users to modify this list. Instead add extra |
| 197 | directories to the customizable variable `mh-path'.") | 200 | directories to the customizable variable `mh-path'.") |
| 198 | 201 | ||
| 199 | (defun mh-variant-mh-info (dir) | 202 | (defun mh-variant-mh-info (dir) |
| @@ -302,10 +305,11 @@ This assumes that a temporary buffer is setup." | |||
| 302 | ;;;###mh-autoload | 305 | ;;;###mh-autoload |
| 303 | (defun mh-image-load-path () | 306 | (defun mh-image-load-path () |
| 304 | "Ensure that the MH-E images are accessible by `find-image'. | 307 | "Ensure that the MH-E images are accessible by `find-image'. |
| 305 | Images for MH-E are found in ../../etc/images relative to the files in | 308 | Images for MH-E are found in ../../etc/images relative to the |
| 306 | `lisp/mh-e'. If `image-load-path' exists (since Emacs 22), then the images | 309 | files in `lisp/mh-e'. If `image-load-path' exists (since Emacs |
| 307 | directory is added to it if isn't already there. Otherwise, the images | 310 | 22), then the images directory is added to it if isn't already |
| 308 | directory is added to the `load-path' if it isn't already there." | 311 | there. Otherwise, the images directory is added to the |
| 312 | `load-path' if it isn't already there." | ||
| 309 | (unless mh-image-load-path-called-flag | 313 | (unless mh-image-load-path-called-flag |
| 310 | (let (mh-library-name mh-image-load-path) | 314 | (let (mh-library-name mh-image-load-path) |
| 311 | ;; First, find mh-e in the load-path. | 315 | ;; First, find mh-e in the load-path. |
| @@ -332,10 +336,11 @@ directory is added to the `load-path' if it isn't already there." | |||
| 332 | "Convert SPEC for defface if necessary to run on older platforms. | 336 | "Convert SPEC for defface if necessary to run on older platforms. |
| 333 | See `defface' for the spec definition. | 337 | See `defface' for the spec definition. |
| 334 | 338 | ||
| 335 | When `mh-min-colors-defined-flag' is nil, this function finds a display with a | 339 | When `mh-min-colors-defined-flag' is nil, this function finds a |
| 336 | single \"class\" requirement with a \"color\" item, renames the requirement to | 340 | display with a single \"class\" requirement with a \"color\" |
| 337 | \"tty\" and moves it to the beginning of the list. It then strips any | 341 | item, renames the requirement to \"tty\" and moves it to the |
| 338 | \"min-colors\" requirements." | 342 | beginning of the list. It then strips any \"min-colors\" |
| 343 | requirements." | ||
| 339 | (when (not mh-min-colors-defined-flag) | 344 | (when (not mh-min-colors-defined-flag) |
| 340 | ;; Insert ((class tty)) display with ((class color)) attributes. | 345 | ;; Insert ((class tty)) display with ((class color)) attributes. |
| 341 | (let ((attributes (cdr (assoc '((class color)) spec)))) | 346 | (let ((attributes (cdr (assoc '((class color)) spec)))) |
diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el index 29caef6cae7..70012163698 100644 --- a/lisp/mh-e/mh-junk.el +++ b/lisp/mh-e/mh-junk.el | |||
| @@ -41,14 +41,15 @@ | |||
| 41 | (defun mh-junk-blacklist (range) | 41 | (defun mh-junk-blacklist (range) |
| 42 | "Blacklist RANGE as spam. | 42 | "Blacklist RANGE as spam. |
| 43 | 43 | ||
| 44 | This command trains the spam program in use (see the option `mh-junk-program') | 44 | This command trains the spam program in use (see the option |
| 45 | with the content of RANGE and then handles the message(s) as specified by the | 45 | `mh-junk-program') with the content of RANGE and then handles the |
| 46 | option `mh-junk-disposition'. | 46 | message(s) as specified by the option `mh-junk-disposition'. |
| 47 | 47 | ||
| 48 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 48 | Check the documentation of `mh-interactive-range' to see how RANGE is |
| 49 | interactive use. | 49 | read in interactive use. |
| 50 | 50 | ||
| 51 | For more information about using your particular spam fighting program, see: | 51 | For more information about using your particular spam fighting |
| 52 | program, see: | ||
| 52 | 53 | ||
| 53 | - `mh-spamassassin-blacklist' | 54 | - `mh-spamassassin-blacklist' |
| 54 | - `mh-bogofilter-blacklist' | 55 | - `mh-bogofilter-blacklist' |
| @@ -80,12 +81,12 @@ For more information about using your particular spam fighting program, see: | |||
| 80 | (defun mh-junk-whitelist (range) | 81 | (defun mh-junk-whitelist (range) |
| 81 | "Whitelist RANGE as ham. | 82 | "Whitelist RANGE as ham. |
| 82 | 83 | ||
| 83 | This command reclassifies the RANGE as ham if it were incorrectly classified | 84 | This command reclassifies the RANGE as ham if it were incorrectly |
| 84 | as spam (see the option `mh-junk-program'). It then refiles the message into | 85 | classified as spam (see the option `mh-junk-program'). It then |
| 85 | the \"+inbox\" folder. | 86 | refiles the message into the \"+inbox\" folder. |
| 86 | 87 | ||
| 87 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 88 | Check the documentation of `mh-interactive-range' to see how |
| 88 | interactive use." | 89 | RANGE is read in interactive use." |
| 89 | (interactive (list (mh-interactive-range "Whitelist"))) | 90 | (interactive (list (mh-interactive-range "Whitelist"))) |
| 90 | (let ((whitelist-func (nth 2 (assoc mh-junk-choice mh-junk-function-alist)))) | 91 | (let ((whitelist-func (nth 2 (assoc mh-junk-choice mh-junk-function-alist)))) |
| 91 | (unless whitelist-func | 92 | (unless whitelist-func |
| @@ -107,8 +108,8 @@ interactive use." | |||
| 107 | (defun mh-spamassassin-blacklist (msg) | 108 | (defun mh-spamassassin-blacklist (msg) |
| 108 | "Blacklist MSG with SpamAssassin. | 109 | "Blacklist MSG with SpamAssassin. |
| 109 | 110 | ||
| 110 | SpamAssassin is one of the more popular spam filtering programs. Get it from | 111 | SpamAssassin is one of the more popular spam filtering programs. Get |
| 111 | your local distribution or from http://spamassassin.org/. | 112 | it from your local distribution or from http://spamassassin.org/. |
| 112 | 113 | ||
| 113 | To use SpamAssassin, add the following recipes to `.procmailrc': | 114 | To use SpamAssassin, add the following recipes to `.procmailrc': |
| 114 | 115 | ||
| @@ -129,52 +130,56 @@ To use SpamAssassin, add the following recipes to `.procmailrc': | |||
| 129 | 130 | ||
| 130 | If you don't use `spamc', use `spamassassin -P -a'. | 131 | If you don't use `spamc', use `spamassassin -P -a'. |
| 131 | 132 | ||
| 132 | Note that one of the recipes above throws away messages with a score greater | 133 | Note that one of the recipes above throws away messages with a score |
| 133 | than or equal to 10. Here's how you can determine a value that works best for | 134 | greater than or equal to 10. Here's how you can determine a value that |
| 134 | you. | 135 | works best for you. |
| 135 | 136 | ||
| 136 | First, run `spamassassin -t' on every mail message in your archive and use | 137 | First, run `spamassassin -t' on every mail message in your archive and |
| 137 | Gnumeric to verify that the average plus the standard deviation of good mail | 138 | use Gnumeric to verify that the average plus the standard deviation of |
| 138 | is under 5, the SpamAssassin default for \"spam\". | 139 | good mail is under 5, the SpamAssassin default for \"spam\". |
| 139 | 140 | ||
| 140 | Using Gnumeric, sort the messages by score and view the messages with the | 141 | Using Gnumeric, sort the messages by score and view the messages with |
| 141 | highest score. Determine the score which encompasses all of your interesting | 142 | the highest score. Determine the score which encompasses all of your |
| 142 | messages and add a couple of points to be conservative. Add that many dots to | 143 | interesting messages and add a couple of points to be conservative. |
| 143 | the `X-Spam-Level:' header field above to send messages with that score down | 144 | Add that many dots to the `X-Spam-Level:' header field above to send |
| 144 | the drain. | 145 | messages with that score down the drain. |
| 145 | 146 | ||
| 146 | In the example above, messages with a score of 5-9 are set aside in the | 147 | In the example above, messages with a score of 5-9 are set aside in |
| 147 | `+spam' folder for later review. The major weakness of rules-based filters is | 148 | the `+spam' folder for later review. The major weakness of rules-based |
| 148 | a plethora of false positives so it is worthwhile to check. | 149 | filters is a plethora of false positives so it is worthwhile to check. |
| 149 | 150 | ||
| 150 | If SpamAssassin classifies a message incorrectly, or is unsure, you can use | 151 | If SpamAssassin classifies a message incorrectly, or is unsure, you |
| 151 | the MH-E commands \\[mh-junk-blacklist] and \\[mh-junk-whitelist]. | 152 | can use the MH-E commands \\[mh-junk-blacklist] and |
| 153 | \\[mh-junk-whitelist]. | ||
| 152 | 154 | ||
| 153 | The \\[mh-junk-blacklist] command adds a `blacklist_from' entry to | 155 | The \\[mh-junk-blacklist] command adds a `blacklist_from' entry to |
| 154 | `~/spamassassin/user_prefs', deletes the message, and sends the message to the | 156 | `~/spamassassin/user_prefs', deletes the message, and sends the |
| 155 | Razor, so that others might not see this spam. If the `sa-learn' command is | 157 | message to the Razor, so that others might not see this spam. If the |
| 156 | available, the message is also recategorized as spam. | 158 | `sa-learn' command is available, the message is also recategorized as |
| 159 | spam. | ||
| 157 | 160 | ||
| 158 | The \\[mh-junk-whitelist] command adds a `whitelist_from' rule to the | 161 | The \\[mh-junk-whitelist] command adds a `whitelist_from' rule to the |
| 159 | `~/.spamassassin/user_prefs' file. If the `sa-learn' command is available, the | 162 | `~/.spamassassin/user_prefs' file. If the `sa-learn' command is |
| 160 | message is also recategorized as ham. | 163 | available, the message is also recategorized as ham. |
| 161 | 164 | ||
| 162 | Over time, you'll observe that the same host or domain occurs repeatedly in | 165 | Over time, you'll observe that the same host or domain occurs |
| 163 | the `blacklist_from' entries, so you might think that you could avoid future | 166 | repeatedly in the `blacklist_from' entries, so you might think that |
| 164 | spam by blacklisting all mail from a particular domain. The utility function | 167 | you could avoid future spam by blacklisting all mail from a particular |
| 165 | `mh-spamassassin-identify-spammers' helps you do precisely that. This function | 168 | domain. The utility function `mh-spamassassin-identify-spammers' helps |
| 166 | displays a frequency count of the hosts and domains in the `blacklist_from' | 169 | you do precisely that. This function displays a frequency count of the |
| 167 | entries from the last blank line in `~/.spamassassin/user_prefs' to the end of | 170 | hosts and domains in the `blacklist_from' entries from the last blank |
| 168 | the file. This information can be used so that you can replace multiple | 171 | line in `~/.spamassassin/user_prefs' to the end of the file. This |
| 172 | information can be used so that you can replace multiple | ||
| 169 | `blacklist_from' entries with a single wildcard entry such as: | 173 | `blacklist_from' entries with a single wildcard entry such as: |
| 170 | 174 | ||
| 171 | blacklist_from *@*amazingoffersdirect2u.com | 175 | blacklist_from *@*amazingoffersdirect2u.com |
| 172 | 176 | ||
| 173 | In versions of SpamAssassin (2.50 and on) that support a Bayesian classifier, | 177 | In versions of SpamAssassin (2.50 and on) that support a Bayesian |
| 174 | \\[mh-junk-blacklist] uses the `sa-learn' program to recategorize the message | 178 | classifier, \\[mh-junk-blacklist] uses the `sa-learn' program to |
| 175 | as spam. Neither MH-E, nor SpamAssassin, rebuilds the database after adding | 179 | recategorize the message as spam. Neither MH-E, nor SpamAssassin, |
| 176 | words, so you will need to run `sa-learn --rebuild' periodically. This can be | 180 | rebuilds the database after adding words, so you will need to run |
| 177 | done by adding the following to your crontab: | 181 | `sa-learn --rebuild' periodically. This can be done by adding the |
| 182 | following to your crontab: | ||
| 178 | 183 | ||
| 179 | 0 * * * * sa-learn --rebuild > /dev/null 2>&1" | 184 | 0 * * * * sa-learn --rebuild > /dev/null 2>&1" |
| 180 | (unless mh-spamassassin-executable | 185 | (unless mh-spamassassin-executable |
| @@ -210,9 +215,9 @@ done by adding the following to your crontab: | |||
| 210 | (defun mh-spamassassin-whitelist (msg) | 215 | (defun mh-spamassassin-whitelist (msg) |
| 211 | "Whitelist MSG with SpamAssassin. | 216 | "Whitelist MSG with SpamAssassin. |
| 212 | 217 | ||
| 213 | The \\[mh-junk-whitelist] command adds a `whitelist_from' rule to the | 218 | The \\[mh-junk-whitelist] command adds a `whitelist_from' rule to |
| 214 | `~/.spamassassin/user_prefs' file. If the `sa-learn' command is available, the | 219 | the `~/.spamassassin/user_prefs' file. If the `sa-learn' command |
| 215 | message is also recategorized as ham. | 220 | is available, the message is also recategorized as ham. |
| 216 | 221 | ||
| 217 | See `mh-spamassassin-blacklist' for more information." | 222 | See `mh-spamassassin-blacklist' for more information." |
| 218 | (unless mh-spamassassin-executable | 223 | (unless mh-spamassassin-executable |
| @@ -263,11 +268,11 @@ The name of the rule is RULE and its body is BODY." | |||
| 263 | (defun mh-spamassassin-identify-spammers () | 268 | (defun mh-spamassassin-identify-spammers () |
| 264 | "Identify spammers who are repeat offenders. | 269 | "Identify spammers who are repeat offenders. |
| 265 | 270 | ||
| 266 | This function displays a frequency count of the hosts and domains in the | 271 | This function displays a frequency count of the hosts and domains |
| 267 | `blacklist_from' entries from the last blank line in | 272 | in the `blacklist_from' entries from the last blank line in |
| 268 | `~/.spamassassin/user_prefs' to the end of the file. This information can be | 273 | `~/.spamassassin/user_prefs' to the end of the file. This |
| 269 | used so that you can replace multiple `blacklist_from' entries with a single | 274 | information can be used so that you can replace multiple |
| 270 | wildcard entry such as: | 275 | `blacklist_from' entries with a single wildcard entry such as: |
| 271 | 276 | ||
| 272 | blacklist_from *@*amazingoffersdirect2u.com" | 277 | blacklist_from *@*amazingoffersdirect2u.com" |
| 273 | (interactive) | 278 | (interactive) |
| @@ -312,8 +317,8 @@ wildcard entry such as: | |||
| 312 | (defun mh-bogofilter-blacklist (msg) | 317 | (defun mh-bogofilter-blacklist (msg) |
| 313 | "Blacklist MSG with bogofilter. | 318 | "Blacklist MSG with bogofilter. |
| 314 | 319 | ||
| 315 | Bogofilter is a Bayesian spam filtering program. Get it from your local | 320 | Bogofilter is a Bayesian spam filtering program. Get it from your |
| 316 | distribution or from http://bogofilter.sourceforge.net/. | 321 | local distribution or from http://bogofilter.sourceforge.net/. |
| 317 | 322 | ||
| 318 | Bogofilter is taught by running: | 323 | Bogofilter is taught by running: |
| 319 | 324 | ||
| @@ -324,9 +329,9 @@ on every good message, and | |||
| 324 | bogofilter -s < spam-message | 329 | bogofilter -s < spam-message |
| 325 | 330 | ||
| 326 | on every spam message. This is called a full training; three other | 331 | on every spam message. This is called a full training; three other |
| 327 | training methods are described in the FAQ that is distributed with bogofilter. | 332 | training methods are described in the FAQ that is distributed with |
| 328 | Note that most Bayesian filters need 1000 to 5000 of each type of message to | 333 | bogofilter. Note that most Bayesian filters need 1000 to 5000 of each |
| 329 | start doing a good job. | 334 | type of message to start doing a good job. |
| 330 | 335 | ||
| 331 | To use bogofilter, add the following recipes to `.procmailrc': | 336 | To use bogofilter, add the following recipes to `.procmailrc': |
| 332 | 337 | ||
| @@ -344,9 +349,9 @@ To use bogofilter, add the following recipes to `.procmailrc': | |||
| 344 | * ^X-Bogosity: Unsure, tests=bogofilter | 349 | * ^X-Bogosity: Unsure, tests=bogofilter |
| 345 | spam/unsure/. | 350 | spam/unsure/. |
| 346 | 351 | ||
| 347 | If bogofilter classifies a message incorrectly, or is unsure, you can use the | 352 | If bogofilter classifies a message incorrectly, or is unsure, you can |
| 348 | MH-E commands \\[mh-junk-blacklist] and \\[mh-junk-whitelist] to update | 353 | use the MH-E commands \\[mh-junk-blacklist] and \\[mh-junk-whitelist] |
| 349 | bogofilter's training. | 354 | to update bogofilter's training. |
| 350 | 355 | ||
| 351 | The \"Bogofilter FAQ\" suggests that you run the following | 356 | The \"Bogofilter FAQ\" suggests that you run the following |
| 352 | occasionally to shrink the database: | 357 | occasionally to shrink the database: |
| @@ -399,9 +404,9 @@ To use SpamProbe, add the following recipes to `.procmailrc': | |||
| 399 | *^X-SpamProbe: SPAM | 404 | *^X-SpamProbe: SPAM |
| 400 | spam/. | 405 | spam/. |
| 401 | 406 | ||
| 402 | If SpamProbe classifies a message incorrectly, you can use the MH-E commands | 407 | If SpamProbe classifies a message incorrectly, you can use the |
| 403 | \\[mh-junk-blacklist] and \\[mh-junk-whitelist] to update SpamProbe's | 408 | MH-E commands \\[mh-junk-blacklist] and \\[mh-junk-whitelist] to |
| 404 | training." | 409 | update SpamProbe's training." |
| 405 | (unless mh-spamprobe-executable | 410 | (unless mh-spamprobe-executable |
| 406 | (error "Unable to find the spamprobe executable")) | 411 | (error "Unable to find the spamprobe executable")) |
| 407 | (let ((msg-file (mh-msg-filename msg mh-current-folder))) | 412 | (let ((msg-file (mh-msg-filename msg mh-current-folder))) |
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index e8b4b2dd2c0..97d494fb5c3 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el | |||
| @@ -55,12 +55,15 @@ | |||
| 55 | ;;;###mh-autoload | 55 | ;;;###mh-autoload |
| 56 | (defun mh-compose-insertion (&optional inline) | 56 | (defun mh-compose-insertion (&optional inline) |
| 57 | "Add tag to include a file such as an image or sound. | 57 | "Add tag to include a file such as an image or sound. |
| 58 | You are prompted for the filename containing the object, the media type if it | ||
| 59 | cannot be determined automatically, and a content description. If you're using | ||
| 60 | MH-style directives, you will also be prompted for additional attributes. | ||
| 61 | 58 | ||
| 62 | The option `mh-compose-insertion' controls what type of tags are inserted. | 59 | You are prompted for the filename containing the object, the |
| 63 | Optional argument INLINE means make it an inline attachment." | 60 | media type if it cannot be determined automatically, and a |
| 61 | content description. If you're using MH-style directives, you | ||
| 62 | will also be prompted for additional attributes. | ||
| 63 | |||
| 64 | The option `mh-compose-insertion' controls what type of tags are | ||
| 65 | inserted. Optional argument INLINE means make it an inline | ||
| 66 | attachment." | ||
| 64 | (interactive "P") | 67 | (interactive "P") |
| 65 | (if (equal mh-compose-insertion 'mml) | 68 | (if (equal mh-compose-insertion 'mml) |
| 66 | (if inline | 69 | (if inline |
| @@ -71,8 +74,10 @@ Optional argument INLINE means make it an inline attachment." | |||
| 71 | ;;;###mh-autoload | 74 | ;;;###mh-autoload |
| 72 | (defun mh-compose-forward (&optional description folder messages) | 75 | (defun mh-compose-forward (&optional description folder messages) |
| 73 | "Add tag to forward a message. | 76 | "Add tag to forward a message. |
| 74 | You are prompted for a content DESCRIPTION, the name of the FOLDER in which | 77 | |
| 75 | the messages to forward are located, and the MESSAGES' numbers. | 78 | You are prompted for a content DESCRIPTION, the name of the |
| 79 | FOLDER in which the messages to forward are located, and the | ||
| 80 | MESSAGES' numbers. | ||
| 76 | 81 | ||
| 77 | The option `mh-compose-insertion' controls what type of tags are inserted." | 82 | The option `mh-compose-insertion' controls what type of tags are inserted." |
| 78 | (interactive (let* | 83 | (interactive (let* |
| @@ -117,9 +122,9 @@ The option `mh-compose-insertion' controls what type of tags are inserted." | |||
| 117 | 122 | ||
| 118 | (defvar mh-mh-to-mime-args nil | 123 | (defvar mh-mh-to-mime-args nil |
| 119 | "Extra arguments for \\[mh-mh-to-mime] to pass to the \"mhbuild\" command. | 124 | "Extra arguments for \\[mh-mh-to-mime] to pass to the \"mhbuild\" command. |
| 120 | The arguments are passed to \"mhbuild\" if \\[mh-mh-to-mime] is given a prefix | 125 | The arguments are passed to \"mhbuild\" if \\[mh-mh-to-mime] is |
| 121 | argument. Normally default arguments to \"mhbuild\" are specified in the MH | 126 | given a prefix argument. Normally default arguments to |
| 122 | profile.") | 127 | \"mhbuild\" are specified in the MH profile.") |
| 123 | 128 | ||
| 124 | (defvar mh-media-type-regexp | 129 | (defvar mh-media-type-regexp |
| 125 | (concat (regexp-opt '("text" "image" "audio" "video" "application" | 130 | (concat (regexp-opt '("text" "image" "audio" "video" "application" |
| @@ -151,12 +156,14 @@ profile.") | |||
| 151 | ("text/plain" "\.vcf" "text/x-vcard")) | 156 | ("text/plain" "\.vcf" "text/x-vcard")) |
| 152 | "Substitutions to make for Content-Type returned from file command. | 157 | "Substitutions to make for Content-Type returned from file command. |
| 153 | The first element is the Content-Type returned by the file command. | 158 | The first element is the Content-Type returned by the file command. |
| 154 | The second element is a regexp matching the file name, usually the extension. | 159 | The second element is a regexp matching the file name, usually the |
| 160 | extension. | ||
| 155 | The third element is the Content-Type to replace with.") | 161 | The third element is the Content-Type to replace with.") |
| 156 | 162 | ||
| 157 | (defun mh-file-mime-type-substitute (content-type filename) | 163 | (defun mh-file-mime-type-substitute (content-type filename) |
| 158 | "Return possibly changed CONTENT-TYPE on the FILENAME. | 164 | "Return possibly changed CONTENT-TYPE on the FILENAME. |
| 159 | Substitutions are made from the `mh-file-mime-type-substitutions' variable." | 165 | Substitutions are made from the `mh-file-mime-type-substitutions' |
| 166 | variable." | ||
| 160 | (let ((subst mh-file-mime-type-substitutions) | 167 | (let ((subst mh-file-mime-type-substitutions) |
| 161 | (type) (match) (answer content-type) | 168 | (type) (match) (answer content-type) |
| 162 | (case-fold-search t)) | 169 | (case-fold-search t)) |
| @@ -225,9 +232,10 @@ See also \\[mh-mh-to-mime].") | |||
| 225 | 232 | ||
| 226 | (defun mh-minibuffer-read-type (filename &optional default) | 233 | (defun mh-minibuffer-read-type (filename &optional default) |
| 227 | "Return the content type associated with the given FILENAME. | 234 | "Return the content type associated with the given FILENAME. |
| 228 | If the \"file\" command exists and recognizes the given file, then its value | 235 | If the \"file\" command exists and recognizes the given file, |
| 229 | is returned\; otherwise, the user is prompted for a type (see | 236 | then its value is returned\; otherwise, the user is prompted for |
| 230 | `mailcap-mime-types' and for Emacs 20, `mh-mime-content-types'). | 237 | a type (see `mailcap-mime-types' and for Emacs 20, |
| 238 | `mh-mime-content-types'). | ||
| 231 | Optional argument DEFAULT is returned if a type isn't entered." | 239 | Optional argument DEFAULT is returned if a type isn't entered." |
| 232 | (mailcap-parse-mimetypes) | 240 | (mailcap-parse-mimetypes) |
| 233 | (let* ((default (or default | 241 | (let* ((default (or default |
| @@ -272,9 +280,10 @@ Optional argument DEFAULT is returned if a type isn't entered." | |||
| 272 | ;;;###mh-autoload | 280 | ;;;###mh-autoload |
| 273 | (defun mh-mh-attach-file (filename type description attributes) | 281 | (defun mh-mh-attach-file (filename type description attributes) |
| 274 | "Add a tag to insert a MIME message part from a file. | 282 | "Add a tag to insert a MIME message part from a file. |
| 275 | You are prompted for the FILENAME containing the object, the media TYPE if it | 283 | You are prompted for the FILENAME containing the object, the |
| 276 | cannot be determined automatically, and a content DESCRIPTION. In addition, | 284 | media TYPE if it cannot be determined automatically, and a |
| 277 | you are also prompted for additional ATTRIBUTES. | 285 | content DESCRIPTION. In addition, you are also prompted for |
| 286 | additional ATTRIBUTES. | ||
| 278 | 287 | ||
| 279 | See also \\[mh-mh-to-mime]." | 288 | See also \\[mh-mh-to-mime]." |
| 280 | (interactive (let ((filename (mml-minibuffer-read-file "Attach file: "))) | 289 | (interactive (let ((filename (mml-minibuffer-read-file "Attach file: "))) |
| @@ -291,9 +300,9 @@ See also \\[mh-mh-to-mime]." | |||
| 291 | (defun mh-mh-compose-type (filename type | 300 | (defun mh-mh-compose-type (filename type |
| 292 | &optional description attributes comment) | 301 | &optional description attributes comment) |
| 293 | "Insert an MH-style directive to insert a file. | 302 | "Insert an MH-style directive to insert a file. |
| 294 | The file specified by FILENAME is encoded as TYPE. An optional DESCRIPTION is | 303 | The file specified by FILENAME is encoded as TYPE. An optional |
| 295 | used as the Content-Description field, optional set of ATTRIBUTES and an | 304 | DESCRIPTION is used as the Content-Description field, optional |
| 296 | optional COMMENT can also be included." | 305 | set of ATTRIBUTES and an optional COMMENT can also be included." |
| 297 | (beginning-of-line) | 306 | (beginning-of-line) |
| 298 | (insert "#" type) | 307 | (insert "#" type) |
| 299 | (and attributes | 308 | (and attributes |
| @@ -309,8 +318,8 @@ optional COMMENT can also be included." | |||
| 309 | ;;;###mh-autoload | 318 | ;;;###mh-autoload |
| 310 | (defun mh-mh-compose-anon-ftp (host filename type description) | 319 | (defun mh-mh-compose-anon-ftp (host filename type description) |
| 311 | "Add tag to include anonymous ftp reference to a file. | 320 | "Add tag to include anonymous ftp reference to a file. |
| 312 | You can even have your message initiate an \"ftp\" transfer when the | 321 | You can even have your message initiate an \"ftp\" transfer when |
| 313 | recipient reads the message. You are prompted for the remote | 322 | the recipient reads the message. You are prompted for the remote |
| 314 | HOST and FILENAME, the media TYPE, and the content DESCRIPTION. | 323 | HOST and FILENAME, the media TYPE, and the content DESCRIPTION. |
| 315 | 324 | ||
| 316 | See also \\[mh-mh-to-mime]." | 325 | See also \\[mh-mh-to-mime]." |
| @@ -325,10 +334,10 @@ See also \\[mh-mh-to-mime]." | |||
| 325 | ;;;###mh-autoload | 334 | ;;;###mh-autoload |
| 326 | (defun mh-mh-compose-external-compressed-tar (host filename description) | 335 | (defun mh-mh-compose-external-compressed-tar (host filename description) |
| 327 | "Add tag to include anonymous ftp reference to a compressed tar file. | 336 | "Add tag to include anonymous ftp reference to a compressed tar file. |
| 328 | In addition to retrieving the file via anonymous \"ftp\" as per the | 337 | In addition to retrieving the file via anonymous \"ftp\" as per |
| 329 | \\[mh-mh-compose-anon-ftp] command, the file will also be uncompressed and | 338 | the \\[mh-mh-compose-anon-ftp] command, the file will also be |
| 330 | untarred. You are prompted for the remote HOST and FILENAME and the content | 339 | uncompressed and untarred. You are prompted for the remote HOST |
| 331 | DESCRIPTION. | 340 | and FILENAME and the content DESCRIPTION. |
| 332 | 341 | ||
| 333 | See also \\[mh-mh-to-mime]." | 342 | See also \\[mh-mh-to-mime]." |
| 334 | (interactive (list | 343 | (interactive (list |
| @@ -347,11 +356,12 @@ See also \\[mh-mh-to-mime]." | |||
| 347 | attributes parameters | 356 | attributes parameters |
| 348 | comment) | 357 | comment) |
| 349 | "Add tag to refer to a remote file. | 358 | "Add tag to refer to a remote file. |
| 350 | This command is a general utility for referencing external files. In fact, all | 359 | This command is a general utility for referencing external files. |
| 351 | of the other commands that insert directives to access external files call | 360 | In fact, all of the other commands that insert directives to |
| 352 | this command. You are prompted for the ACCESS-TYPE, remote HOST and FILENAME, | 361 | access external files call this command. You are prompted for the |
| 353 | and content TYPE. If you provide a prefix argument, you are also prompted for | 362 | ACCESS-TYPE, remote HOST and FILENAME, and content TYPE. If you |
| 354 | a content DESCRIPTION, ATTRIBUTES, PARAMETERS, and a COMMENT. | 363 | provide a prefix argument, you are also prompted for a content |
| 364 | DESCRIPTION, ATTRIBUTES, PARAMETERS, and a COMMENT. | ||
| 355 | 365 | ||
| 356 | See also \\[mh-mh-to-mime]." | 366 | See also \\[mh-mh-to-mime]." |
| 357 | (interactive (list | 367 | (interactive (list |
| @@ -386,8 +396,9 @@ See also \\[mh-mh-to-mime]." | |||
| 386 | ;;;###mh-autoload | 396 | ;;;###mh-autoload |
| 387 | (defun mh-mh-forward-message (&optional description folder messages) | 397 | (defun mh-mh-forward-message (&optional description folder messages) |
| 388 | "Add tag to forward a message. | 398 | "Add tag to forward a message. |
| 389 | You are prompted for a content DESCRIPTION, the name of the FOLDER in which | 399 | You are prompted for a content DESCRIPTION, the name of the |
| 390 | the messages to forward are located, and the MESSAGES' numbers. | 400 | FOLDER in which the messages to forward are located, and the |
| 401 | MESSAGES' numbers. | ||
| 391 | 402 | ||
| 392 | See also \\[mh-mh-to-mime]." | 403 | See also \\[mh-mh-to-mime]." |
| 393 | (interactive (list | 404 | (interactive (list |
| @@ -420,22 +431,24 @@ See also \\[mh-mh-to-mime]." | |||
| 420 | (defun mh-mh-to-mime (&optional extra-args) | 431 | (defun mh-mh-to-mime (&optional extra-args) |
| 421 | "Compose MIME message from MH-style directives. | 432 | "Compose MIME message from MH-style directives. |
| 422 | 433 | ||
| 423 | Typically, you send a message with attachments just like any other message. | 434 | Typically, you send a message with attachments just like any other |
| 424 | However, you may take a sneak preview of the MIME encoding if you wish by | 435 | message. However, you may take a sneak preview of the MIME encoding if |
| 425 | running this command. | 436 | you wish by running this command. |
| 426 | 437 | ||
| 427 | If you wish to pass additional arguments to \"mhbuild\" (\"mhn\") to affect | 438 | If you wish to pass additional arguments to \"mhbuild\" (\"mhn\") to |
| 428 | how it builds your message, use the `mh-mh-to-mime-args' option. For example, | 439 | affect how it builds your message, use the `mh-mh-to-mime-args' |
| 429 | you can build a consistency check into the message by setting | 440 | option. For example, you can build a consistency check into the |
| 430 | `mh-mh-to-mime-args' to \"-check\". The recipient of your message can then run | 441 | message by setting `mh-mh-to-mime-args' to \"-check\". The recipient |
| 431 | \"mhbuild -check\" on the message--\"mhbuild\" (\"mhn\") will complain if the | 442 | of your message can then run \"mhbuild -check\" on the |
| 432 | message has been corrupted on the way. This command only consults this option | 443 | message--\"mhbuild\" (\"mhn\") will complain if the message has been |
| 433 | when given a prefix argument EXTRA-ARGS. | 444 | corrupted on the way. This command only consults this option when |
| 445 | given a prefix argument EXTRA-ARGS. | ||
| 434 | 446 | ||
| 435 | The hook `mh-mh-to-mime-hook' is called after the message has been | 447 | The hook `mh-mh-to-mime-hook' is called after the message has been |
| 436 | formatted. | 448 | formatted. |
| 437 | 449 | ||
| 438 | The effects of this command can be undone by running \\[mh-mh-to-mime-undo]." | 450 | The effects of this command can be undone by running |
| 451 | \\[mh-mh-to-mime-undo]." | ||
| 439 | (interactive "*P") | 452 | (interactive "*P") |
| 440 | (mh-mh-quote-unescaped-sharp) | 453 | (mh-mh-quote-unescaped-sharp) |
| 441 | (save-buffer) | 454 | (save-buffer) |
| @@ -457,9 +470,9 @@ The effects of this command can be undone by running \\[mh-mh-to-mime-undo]." | |||
| 457 | 470 | ||
| 458 | (defun mh-mh-quote-unescaped-sharp () | 471 | (defun mh-mh-quote-unescaped-sharp () |
| 459 | "Quote `#' characters that haven't been quoted for \"mhbuild\". | 472 | "Quote `#' characters that haven't been quoted for \"mhbuild\". |
| 460 | If the `#' character is present in the first column, but it isn't part of a | 473 | If the `#' character is present in the first column, but it isn't |
| 461 | MH-style directive then \"mhbuild\" gives an error. This function will quote | 474 | part of a MH-style directive then \"mhbuild\" gives an error. |
| 462 | all such characters." | 475 | This function will quote all such characters." |
| 463 | (save-excursion | 476 | (save-excursion |
| 464 | (goto-char (point-min)) | 477 | (goto-char (point-min)) |
| 465 | (while (re-search-forward "^#" nil t) | 478 | (while (re-search-forward "^#" nil t) |
| @@ -471,7 +484,8 @@ all such characters." | |||
| 471 | ;;;###mh-autoload | 484 | ;;;###mh-autoload |
| 472 | (defun mh-mh-to-mime-undo (noconfirm) | 485 | (defun mh-mh-to-mime-undo (noconfirm) |
| 473 | "Undo effects of \\[mh-mh-to-mime]. | 486 | "Undo effects of \\[mh-mh-to-mime]. |
| 474 | Optional non-nil argument NOCONFIRM means don't ask for confirmation." | 487 | Optional non-nil argument NOCONFIRM means don't ask for |
| 488 | confirmation." | ||
| 475 | (interactive "*P") | 489 | (interactive "*P") |
| 476 | (if (null buffer-file-name) | 490 | (if (null buffer-file-name) |
| 477 | (error "Buffer does not seem to be associated with any file")) | 491 | (error "Buffer does not seem to be associated with any file")) |
| @@ -499,8 +513,8 @@ Optional non-nil argument NOCONFIRM means don't ask for confirmation." | |||
| 499 | ;;;###mh-autoload | 513 | ;;;###mh-autoload |
| 500 | (defun mh-mh-directive-present-p (&optional begin end) | 514 | (defun mh-mh-directive-present-p (&optional begin end) |
| 501 | "Check if the text between BEGIN and END might be a MH-style directive. | 515 | "Check if the text between BEGIN and END might be a MH-style directive. |
| 502 | The optional argument BEGIN defaults to the beginning of the buffer, while END | 516 | The optional argument BEGIN defaults to the beginning of the |
| 503 | defaults to the the end of the buffer." | 517 | buffer, while END defaults to the the end of the buffer." |
| 504 | (unless begin (setq begin (point-min))) | 518 | (unless begin (setq begin (point-min))) |
| 505 | (unless end (setq end (point-max))) | 519 | (unless end (setq end (point-max))) |
| 506 | (save-excursion | 520 | (save-excursion |
| @@ -525,9 +539,10 @@ defaults to the the end of the buffer." | |||
| 525 | ;;;###mh-autoload | 539 | ;;;###mh-autoload |
| 526 | (defun mh-mml-to-mime () | 540 | (defun mh-mml-to-mime () |
| 527 | "Compose MIME message from MML tags. | 541 | "Compose MIME message from MML tags. |
| 528 | Typically, you send a message with attachments just like any other message. | 542 | |
| 529 | However, you may take a sneak preview of the MIME encoding if you wish by | 543 | Typically, you send a message with attachments just like any |
| 530 | running this command. | 544 | other message. However, you may take a sneak preview of the MIME |
| 545 | encoding if you wish by running this command. | ||
| 531 | 546 | ||
| 532 | This action can be undone by running \\[undo]." | 547 | This action can be undone by running \\[undo]." |
| 533 | (interactive) | 548 | (interactive) |
| @@ -548,8 +563,9 @@ This action can be undone by running \\[undo]." | |||
| 548 | ;;;###mh-autoload | 563 | ;;;###mh-autoload |
| 549 | (defun mh-mml-forward-message (description folder message) | 564 | (defun mh-mml-forward-message (description folder message) |
| 550 | "Forward a message as attachment. | 565 | "Forward a message as attachment. |
| 551 | The function will prompt the user for a DESCRIPTION, a FOLDER and MESSAGE | 566 | |
| 552 | number." | 567 | The function will prompt the user for a DESCRIPTION, a FOLDER and |
| 568 | MESSAGE number." | ||
| 553 | (let ((msg (if (and (equal message "") (numberp mh-sent-from-msg)) | 569 | (let ((msg (if (and (equal message "") (numberp mh-sent-from-msg)) |
| 554 | mh-sent-from-msg | 570 | mh-sent-from-msg |
| 555 | (car (read-from-string message))))) | 571 | (car (read-from-string message))))) |
| @@ -582,9 +598,10 @@ number." | |||
| 582 | ;;;###mh-autoload | 598 | ;;;###mh-autoload |
| 583 | (defun mh-mml-attach-file (&optional disposition) | 599 | (defun mh-mml-attach-file (&optional disposition) |
| 584 | "Add a tag to insert a MIME message part from a file. | 600 | "Add a tag to insert a MIME message part from a file. |
| 585 | You are prompted for the filename containing the object, the media type if it | 601 | |
| 586 | cannot be determined automatically, a content description and the DISPOSITION | 602 | You are prompted for the filename containing the object, the |
| 587 | of the attachment. | 603 | media type if it cannot be determined automatically, a content |
| 604 | description and the DISPOSITION of the attachment. | ||
| 588 | 605 | ||
| 589 | This is basically `mml-attach-file' from Gnus, modified such that a prefix | 606 | This is basically `mml-attach-file' from Gnus, modified such that a prefix |
| 590 | argument yields an `inline' disposition and Content-Type is determined | 607 | argument yields an `inline' disposition and Content-Type is determined |
| @@ -601,6 +618,7 @@ automatically." | |||
| 601 | 618 | ||
| 602 | (defun mh-secure-message (method mode &optional identity) | 619 | (defun mh-secure-message (method mode &optional identity) |
| 603 | "Add tag to encrypt or sign message. | 620 | "Add tag to encrypt or sign message. |
| 621 | |||
| 604 | METHOD should be one of: \"pgpmime\", \"pgp\", \"smime\". | 622 | METHOD should be one of: \"pgpmime\", \"pgp\", \"smime\". |
| 605 | MODE should be one of: \"sign\", \"encrypt\", \"signencrypt\", \"none\". | 623 | MODE should be one of: \"sign\", \"encrypt\", \"signencrypt\", \"none\". |
| 606 | IDENTITY is optionally the default-user-id to use." | 624 | IDENTITY is optionally the default-user-id to use." |
| @@ -635,30 +653,33 @@ The argument IGNORE is not used." | |||
| 635 | ;;;###mh-autoload | 653 | ;;;###mh-autoload |
| 636 | (defun mh-mml-secure-message-sign (method) | 654 | (defun mh-mml-secure-message-sign (method) |
| 637 | "Add tag to sign the message. | 655 | "Add tag to sign the message. |
| 638 | A proper multipart message is created for you when you send the message. Use | 656 | |
| 639 | the \\[mh-mml-unsecure-message] command to remove this tag. Use a prefix | 657 | A proper multipart message is created for you when you send the |
| 640 | argument METHOD to be prompted for one of the possible security methods | 658 | message. Use the \\[mh-mml-unsecure-message] command to remove |
| 641 | \(see `mh-mml-method-default')." | 659 | this tag. Use a prefix argument METHOD to be prompted for one of |
| 660 | the possible security methods \(see `mh-mml-method-default')." | ||
| 642 | (interactive (list (mh-mml-query-cryptographic-method))) | 661 | (interactive (list (mh-mml-query-cryptographic-method))) |
| 643 | (mh-secure-message method "sign" mh-identity-pgg-default-user-id)) | 662 | (mh-secure-message method "sign" mh-identity-pgg-default-user-id)) |
| 644 | 663 | ||
| 645 | ;;;###mh-autoload | 664 | ;;;###mh-autoload |
| 646 | (defun mh-mml-secure-message-encrypt (method) | 665 | (defun mh-mml-secure-message-encrypt (method) |
| 647 | "Add tag to encrypt the message. | 666 | "Add tag to encrypt the message. |
| 648 | A proper multipart message is created for you when you send the message. Use | 667 | |
| 649 | the \\[mh-mml-unsecure-message] command to remove this tag. Use a prefix | 668 | A proper multipart message is created for you when you send the |
| 650 | argument METHOD to be prompted for one of the possible security methods | 669 | message. Use the \\[mh-mml-unsecure-message] command to remove |
| 651 | \(see `mh-mml-method-default')." | 670 | this tag. Use a prefix argument METHOD to be prompted for one of |
| 671 | the possible security methods \(see `mh-mml-method-default')." | ||
| 652 | (interactive (list (mh-mml-query-cryptographic-method))) | 672 | (interactive (list (mh-mml-query-cryptographic-method))) |
| 653 | (mh-secure-message method "encrypt" mh-identity-pgg-default-user-id)) | 673 | (mh-secure-message method "encrypt" mh-identity-pgg-default-user-id)) |
| 654 | 674 | ||
| 655 | ;;;###mh-autoload | 675 | ;;;###mh-autoload |
| 656 | (defun mh-mml-secure-message-signencrypt (method) | 676 | (defun mh-mml-secure-message-signencrypt (method) |
| 657 | "Add tag to encrypt and sign the message. | 677 | "Add tag to encrypt and sign the message. |
| 658 | A proper multipart message is created for you when you send the message. Use | 678 | |
| 659 | the \\[mh-mml-unsecure-message] command to remove this tag. Use a prefix | 679 | A proper multipart message is created for you when you send the |
| 660 | argument METHOD to be prompted for one of the possible security methods | 680 | message. Use the \\[mh-mml-unsecure-message] command to remove |
| 661 | \(see `mh-mml-method-default')." | 681 | this tag. Use a prefix argument METHOD to be prompted for one of |
| 682 | the possible security methods \(see `mh-mml-method-default')." | ||
| 662 | (interactive (list (mh-mml-query-cryptographic-method))) | 683 | (interactive (list (mh-mml-query-cryptographic-method))) |
| 663 | (mh-secure-message method "signencrypt" mh-identity-pgg-default-user-id)) | 684 | (mh-secure-message method "signencrypt" mh-identity-pgg-default-user-id)) |
| 664 | 685 | ||
| @@ -695,10 +716,11 @@ argument METHOD to be prompted for one of the possible security methods | |||
| 695 | 716 | ||
| 696 | (defun mh-handle-set-external-undisplayer (folder handle function) | 717 | (defun mh-handle-set-external-undisplayer (folder handle function) |
| 697 | "Replacement for `mm-handle-set-external-undisplayer'. | 718 | "Replacement for `mm-handle-set-external-undisplayer'. |
| 698 | This is only called in recent versions of Gnus. The MIME handles are stored | 719 | |
| 699 | in data structures corresponding to MH-E folder buffer FOLDER instead of in | 720 | This is only called in recent versions of Gnus. The MIME handles |
| 700 | Gnus (as in the original). The MIME part, HANDLE is associated with the | 721 | are stored in data structures corresponding to MH-E folder buffer |
| 701 | undisplayer FUNCTION." | 722 | FOLDER instead of in Gnus (as in the original). The MIME part, |
| 723 | HANDLE is associated with the undisplayer FUNCTION." | ||
| 702 | (if (mm-keep-viewer-alive-p handle) | 724 | (if (mm-keep-viewer-alive-p handle) |
| 703 | (let ((new-handle (copy-sequence handle))) | 725 | (let ((new-handle (copy-sequence handle))) |
| 704 | (mm-handle-set-undisplayer new-handle function) | 726 | (mm-handle-set-undisplayer new-handle function) |
| @@ -716,7 +738,8 @@ undisplayer FUNCTION." | |||
| 716 | ;;;###mh-autoload | 738 | ;;;###mh-autoload |
| 717 | (defun mh-add-missing-mime-version-header () | 739 | (defun mh-add-missing-mime-version-header () |
| 718 | "Some mail programs don't put a MIME-Version header. | 740 | "Some mail programs don't put a MIME-Version header. |
| 719 | I have seen this only in spam, so maybe we shouldn't fix this ;-)" | 741 | I have seen this only in spam, so maybe we shouldn't fix |
| 742 | this ;-)" | ||
| 720 | (save-excursion | 743 | (save-excursion |
| 721 | (goto-char (point-min)) | 744 | (goto-char (point-min)) |
| 722 | (re-search-forward "\n\n" nil t) | 745 | (re-search-forward "\n\n" nil t) |
| @@ -729,7 +752,8 @@ I have seen this only in spam, so maybe we shouldn't fix this ;-)" | |||
| 729 | 752 | ||
| 730 | (defun mh-small-show-buffer-p () | 753 | (defun mh-small-show-buffer-p () |
| 731 | "Check if show buffer is small. | 754 | "Check if show buffer is small. |
| 732 | This is used to decide if smileys and graphical emphasis will be displayed." | 755 | This is used to decide if smileys and graphical emphasis will be |
| 756 | displayed." | ||
| 733 | (let ((max nil)) | 757 | (let ((max nil)) |
| 734 | (when (and (boundp 'font-lock-maximum-size) font-lock-maximum-size) | 758 | (when (and (boundp 'font-lock-maximum-size) font-lock-maximum-size) |
| 735 | (cond ((numberp font-lock-maximum-size) | 759 | (cond ((numberp font-lock-maximum-size) |
| @@ -803,12 +827,13 @@ Set from last use.") | |||
| 803 | (defun mh-mime-save-parts (prompt) | 827 | (defun mh-mime-save-parts (prompt) |
| 804 | "Save attachments. | 828 | "Save attachments. |
| 805 | 829 | ||
| 806 | You can save all of the attachments at once with this command. The attachments | 830 | You can save all of the attachments at once with this command. |
| 807 | are saved in the directory specified by the option | 831 | The attachments are saved in the directory specified by the |
| 808 | `mh-mime-save-parts-default-directory' unless you use a prefix argument PROMPT | 832 | option `mh-mime-save-parts-default-directory' unless you use a |
| 809 | in which case you are prompted for the directory. These directories may be | 833 | prefix argument PROMPT in which case you are prompted for the |
| 810 | superseded by MH profile components, since this function calls on | 834 | directory. These directories may be superseded by MH profile |
| 811 | \"mhstore\" (\"mhn\") to do the work." | 835 | components, since this function calls on \"mhstore\" (\"mhn\") to |
| 836 | do the work." | ||
| 812 | (interactive "P") | 837 | (interactive "P") |
| 813 | (let ((msg (if (eq major-mode 'mh-show-mode) | 838 | (let ((msg (if (eq major-mode 'mh-show-mode) |
| 814 | (mh-show-buffer-message-number) | 839 | (mh-show-buffer-message-number) |
| @@ -900,9 +925,9 @@ If message has been encoded for transfer take that into account." | |||
| 900 | ;;;###mh-autoload | 925 | ;;;###mh-autoload |
| 901 | (defun mh-mime-display (&optional pre-dissected-handles) | 926 | (defun mh-mime-display (&optional pre-dissected-handles) |
| 902 | "Display (and possibly decode) MIME handles. | 927 | "Display (and possibly decode) MIME handles. |
| 903 | Optional argument, PRE-DISSECTED-HANDLES is a list of MIME handles. If | 928 | Optional argument, PRE-DISSECTED-HANDLES is a list of MIME |
| 904 | present they are displayed otherwise the buffer is parsed and then | 929 | handles. If present they are displayed otherwise the buffer is |
| 905 | displayed." | 930 | parsed and then displayed." |
| 906 | (let ((handles ()) | 931 | (let ((handles ()) |
| 907 | (folder mh-show-folder-buffer) | 932 | (folder mh-show-folder-buffer) |
| 908 | (raw-message-data (buffer-string))) | 933 | (raw-message-data (buffer-string))) |
| @@ -974,8 +999,8 @@ If no part is preferred then all the parts are displayed." | |||
| 974 | 999 | ||
| 975 | (defun mh-mime-maybe-display-alternatives (alternatives) | 1000 | (defun mh-mime-maybe-display-alternatives (alternatives) |
| 976 | "Show buttons for ALTERNATIVES. | 1001 | "Show buttons for ALTERNATIVES. |
| 977 | If `mh-mime-display-alternatives-flag' is non-nil then display buttons for | 1002 | If `mh-mime-display-alternatives-flag' is non-nil then display |
| 978 | alternative parts that are usually suppressed." | 1003 | buttons for alternative parts that are usually suppressed." |
| 979 | (when (and mh-display-buttons-for-alternatives-flag alternatives) | 1004 | (when (and mh-display-buttons-for-alternatives-flag alternatives) |
| 980 | (insert "\n----------------------------------------------------\n") | 1005 | (insert "\n----------------------------------------------------\n") |
| 981 | (insert "Alternatives:\n") | 1006 | (insert "Alternatives:\n") |
| @@ -990,9 +1015,9 @@ alternative parts that are usually suppressed." | |||
| 990 | 1015 | ||
| 991 | (defun mh-mime-part-index (handle) | 1016 | (defun mh-mime-part-index (handle) |
| 992 | "Generate the button number for MIME part, HANDLE. | 1017 | "Generate the button number for MIME part, HANDLE. |
| 993 | Notice that a hash table is used to display the same number when buttons need | 1018 | Notice that a hash table is used to display the same number when |
| 994 | to be displayed multiple times (for instance when nested messages are | 1019 | buttons need to be displayed multiple times (for instance when |
| 995 | opened)." | 1020 | nested messages are opened)." |
| 996 | (or (gethash handle (mh-mime-part-index-hash (mh-buffer-data))) | 1021 | (or (gethash handle (mh-mime-part-index-hash (mh-buffer-data))) |
| 997 | (setf (gethash handle (mh-mime-part-index-hash (mh-buffer-data))) | 1022 | (setf (gethash handle (mh-mime-part-index-hash (mh-buffer-data))) |
| 998 | (incf (mh-mime-parts-count (mh-buffer-data)))))) | 1023 | (incf (mh-mime-parts-count (mh-buffer-data)))))) |
| @@ -1075,8 +1100,8 @@ This is only useful if a Content-Disposition header is not present." | |||
| 1075 | 1100 | ||
| 1076 | (defun mh-signature-highlight (&optional handle) | 1101 | (defun mh-signature-highlight (&optional handle) |
| 1077 | "Highlight message signature in HANDLE. | 1102 | "Highlight message signature in HANDLE. |
| 1078 | The optional argument, HANDLE is a MIME handle if the function is being used | 1103 | The optional argument, HANDLE is a MIME handle if the function is |
| 1079 | to highlight the signature in a MIME part." | 1104 | being used to highlight the signature in a MIME part." |
| 1080 | (let ((regexp | 1105 | (let ((regexp |
| 1081 | (cond ((not handle) "^-- $") | 1106 | (cond ((not handle) "^-- $") |
| 1082 | ((not (and (equal (mm-handle-media-supertype handle) "text") | 1107 | ((not (and (equal (mm-handle-media-supertype handle) "text") |
| @@ -1101,8 +1126,8 @@ to highlight the signature in a MIME part." | |||
| 1101 | 1126 | ||
| 1102 | (defun mh-insert-mime-button (handle index displayed) | 1127 | (defun mh-insert-mime-button (handle index displayed) |
| 1103 | "Insert MIME button for HANDLE. | 1128 | "Insert MIME button for HANDLE. |
| 1104 | INDEX is the part number that will be DISPLAYED. It is also used by commands | 1129 | INDEX is the part number that will be DISPLAYED. It is also used |
| 1105 | like \"K v\" which operate on individual MIME parts." | 1130 | by commands like \"K v\" which operate on individual MIME parts." |
| 1106 | ;; The button could be displayed by a previous decode. In that case | 1131 | ;; The button could be displayed by a previous decode. In that case |
| 1107 | ;; undisplay it if we need a hidden button. | 1132 | ;; undisplay it if we need a hidden button. |
| 1108 | (when (and (mm-handle-displayed-p handle) (not displayed)) | 1133 | (when (and (mm-handle-displayed-p handle) (not displayed)) |
| @@ -1214,8 +1239,8 @@ like \"K v\" which operate on individual MIME parts." | |||
| 1214 | (defun mh-press-button () | 1239 | (defun mh-press-button () |
| 1215 | "View contents of button. | 1240 | "View contents of button. |
| 1216 | 1241 | ||
| 1217 | This command is a toggle so if you use it again on the same attachment, the | 1242 | This command is a toggle so if you use it again on the same |
| 1218 | attachment is hidden." | 1243 | attachment, the attachment is hidden." |
| 1219 | (interactive) | 1244 | (interactive) |
| 1220 | (let ((mm-inline-media-tests mh-mm-inline-media-tests) | 1245 | (let ((mm-inline-media-tests mh-mm-inline-media-tests) |
| 1221 | (data (get-text-property (point) 'mh-data)) | 1246 | (data (get-text-property (point) 'mh-data)) |
| @@ -1233,9 +1258,10 @@ attachment is hidden." | |||
| 1233 | ;;;###mh-autoload | 1258 | ;;;###mh-autoload |
| 1234 | (defun mh-push-button (event) | 1259 | (defun mh-push-button (event) |
| 1235 | "Click MIME button for EVENT. | 1260 | "Click MIME button for EVENT. |
| 1236 | If the MIME part is visible then it is removed. Otherwise the part is | 1261 | |
| 1237 | displayed. This function is called when the mouse is used to click the MIME | 1262 | If the MIME part is visible then it is removed. Otherwise the |
| 1238 | button." | 1263 | part is displayed. This function is called when the mouse is used |
| 1264 | to click the MIME button." | ||
| 1239 | (interactive "e") | 1265 | (interactive "e") |
| 1240 | (mh-do-at-event-location event | 1266 | (mh-do-at-event-location event |
| 1241 | (let ((folder mh-show-folder-buffer) | 1267 | (let ((folder mh-show-folder-buffer) |
| @@ -1289,21 +1315,24 @@ button." | |||
| 1289 | (defun mh-display-with-external-viewer (part-index) | 1315 | (defun mh-display-with-external-viewer (part-index) |
| 1290 | "View attachment externally. | 1316 | "View attachment externally. |
| 1291 | 1317 | ||
| 1292 | If Emacs does not know how to view an attachment, you could save it into a | 1318 | If Emacs does not know how to view an attachment, you could save |
| 1293 | file and then run some program to open it. It is easier, however, to launch | 1319 | it into a file and then run some program to open it. It is |
| 1294 | the program directly from MH-E with this command. While you'll most likely use | 1320 | easier, however, to launch the program directly from MH-E with |
| 1295 | this to view spreadsheets and documents, it is also useful to use your browser | 1321 | this command. While you'll most likely use this to view |
| 1296 | to view HTML attachments with higher fidelity than what Emacs can provide. | 1322 | spreadsheets and documents, it is also useful to use your browser |
| 1297 | 1323 | to view HTML attachments with higher fidelity than what Emacs can | |
| 1298 | This command displays the attachment associated with the button under the | 1324 | provide. |
| 1299 | cursor. If the cursor is not located over a button, then the cursor first | 1325 | |
| 1300 | moves to the next button, wrapping to the beginning of the message if | 1326 | This command displays the attachment associated with the button |
| 1301 | necessary. You can provide a numeric prefix argument PART-INDEX to view the | 1327 | under the cursor. If the cursor is not located over a button, |
| 1302 | attachment labeled with that number. | 1328 | then the cursor first moves to the next button, wrapping to the |
| 1303 | 1329 | beginning of the message if necessary. You can provide a numeric | |
| 1304 | This command tries to provide a reasonable default for the viewer by calling | 1330 | prefix argument PART-INDEX to view the attachment labeled with |
| 1305 | the Emacs function `mailcap-mime-info'. This function usually reads the file | 1331 | that number. |
| 1306 | \"/etc/mailcap\"." | 1332 | |
| 1333 | This command tries to provide a reasonable default for the viewer | ||
| 1334 | by calling the Emacs function `mailcap-mime-info'. This function | ||
| 1335 | usually reads the file \"/etc/mailcap\"." | ||
| 1307 | (interactive "P") | 1336 | (interactive "P") |
| 1308 | (when (consp part-index) (setq part-index (car part-index))) | 1337 | (when (consp part-index) (setq part-index (car part-index))) |
| 1309 | (mh-folder-mime-action | 1338 | (mh-folder-mime-action |
| @@ -1458,8 +1487,8 @@ Parameter EL is unused." | |||
| 1458 | 1487 | ||
| 1459 | (defun mh-mm-inline-message (handle) | 1488 | (defun mh-mm-inline-message (handle) |
| 1460 | "Display message, HANDLE. | 1489 | "Display message, HANDLE. |
| 1461 | The function decodes the message and displays it. It avoids decoding the same | 1490 | The function decodes the message and displays it. It avoids |
| 1462 | message multiple times." | 1491 | decoding the same message multiple times." |
| 1463 | (let ((b (point)) | 1492 | (let ((b (point)) |
| 1464 | (clean-message-header mh-clean-message-header-flag) | 1493 | (clean-message-header mh-clean-message-header-flag) |
| 1465 | (invisible-headers mh-invisible-header-fields-compiled) | 1494 | (invisible-headers mh-invisible-header-fields-compiled) |
diff --git a/lisp/mh-e/mh-pick.el b/lisp/mh-e/mh-pick.el index 5a0a5e6c859..02de9ff859a 100644 --- a/lisp/mh-e/mh-pick.el +++ b/lisp/mh-e/mh-pick.el | |||
| @@ -55,12 +55,12 @@ | |||
| 55 | "Search FOLDER for messages matching a pattern. | 55 | "Search FOLDER for messages matching a pattern. |
| 56 | 56 | ||
| 57 | With this command, you can search a folder for messages to or from a | 57 | With this command, you can search a folder for messages to or from a |
| 58 | particular person or about a particular subject. In fact, you can also search | 58 | particular person or about a particular subject. In fact, you can also |
| 59 | for messages containing selected strings in any arbitrary header field or any | 59 | search for messages containing selected strings in any arbitrary |
| 60 | string found within the messages. | 60 | header field or any string found within the messages. |
| 61 | 61 | ||
| 62 | You are first prompted for the name of the folder to search and then placed in | 62 | You are first prompted for the name of the folder to search and then |
| 63 | the following buffer in MH-Pick mode: | 63 | placed in the following buffer in MH-Pick mode: |
| 64 | 64 | ||
| 65 | From: | 65 | From: |
| 66 | To: | 66 | To: |
| @@ -69,24 +69,26 @@ the following buffer in MH-Pick mode: | |||
| 69 | Subject: | 69 | Subject: |
| 70 | -------- | 70 | -------- |
| 71 | 71 | ||
| 72 | Edit this template by entering your search criteria in an appropriate header | 72 | Edit this template by entering your search criteria in an appropriate |
| 73 | field that is already there, or create a new field yourself. If the string | 73 | header field that is already there, or create a new field yourself. If |
| 74 | you're looking for could be anywhere in a message, then place the string | 74 | the string you're looking for could be anywhere in a message, then |
| 75 | underneath the row of dashes. The \\[mh-search-folder] command uses the MH | 75 | place the string underneath the row of dashes. The |
| 76 | command \"pick\" to do the real work. | 76 | \\[mh-search-folder] command uses the MH command \"pick\" to do the |
| 77 | 77 | real work. | |
| 78 | There are no semantics associated with the search criteria--they are simply | 78 | |
| 79 | treated as strings. Case is ignored when all lowercase is used, and regular | 79 | There are no semantics associated with the search criteria--they are |
| 80 | expressions (a la \"ed\") are available. It is all right to specify several | 80 | simply treated as strings. Case is ignored when all lowercase is used, |
| 81 | search criteria. What happens then is that a logical _and_ of the various | 81 | and regular expressions (a la \"ed\") are available. It is all right |
| 82 | fields is performed. If you prefer a logical _or_ operation, run | 82 | to specify several search criteria. What happens then is that a |
| 83 | \\[mh-search-folder] multiple times. | 83 | logical _and_ of the various fields is performed. If you prefer a |
| 84 | 84 | logical _or_ operation, run \\[mh-search-folder] multiple times. | |
| 85 | As an example, let's say that we want to find messages from Ginnean about | 85 | |
| 86 | horseback riding in the Kosciusko National Park (Australia) during January, | 86 | As an example, let's say that we want to find messages from Ginnean |
| 87 | 1994. Normally we would start with a broad search and narrow it down if | 87 | about horseback riding in the Kosciusko National Park (Australia) |
| 88 | necessary to produce a manageable amount of data, but we'll cut to the chase | 88 | during January, 1994. Normally we would start with a broad search and |
| 89 | and create a fairly restrictive set of criteria as follows: | 89 | narrow it down if necessary to produce a manageable amount of data, |
| 90 | but we'll cut to the chase and create a fairly restrictive set of | ||
| 91 | criteria as follows: | ||
| 90 | 92 | ||
| 91 | From: ginnean | 93 | From: ginnean |
| 92 | To: | 94 | To: |
| @@ -98,29 +100,32 @@ and create a fairly restrictive set of criteria as follows: | |||
| 98 | As with MH-Letter mode, MH-Pick provides commands like | 100 | As with MH-Letter mode, MH-Pick provides commands like |
| 99 | \\<mh-pick-mode-map>\\[mh-to-field] to help you fill in the blanks. | 101 | \\<mh-pick-mode-map>\\[mh-to-field] to help you fill in the blanks. |
| 100 | 102 | ||
| 101 | To perform the search, type \\[mh-do-search]. The selected messages are placed | 103 | To perform the search, type \\[mh-do-search]. The selected messages |
| 102 | in the \"search\" sequence, which you can use later in forwarding, printing, | 104 | are placed in the \"search\" sequence, which you can use later in |
| 103 | or narrowing your field of view. Subsequent searches are appended to the | 105 | forwarding, printing, or narrowing your field of view. Subsequent |
| 104 | \"search\" sequence. If, however, you wish to start with a clean slate, first | 106 | searches are appended to the \"search\" sequence. If, however, you |
| 105 | delete the \"search\" sequence. | 107 | wish to start with a clean slate, first delete the \"search\" |
| 106 | 108 | sequence. | |
| 107 | If you're searching in a folder that is already displayed in an MH-Folder | 109 | |
| 108 | buffer, only those messages contained in the buffer are used for the search. | 110 | If you're searching in a folder that is already displayed in an |
| 109 | Therefore, if you want to search in all messages, first kill the folder's | 111 | MH-Folder buffer, only those messages contained in the buffer are used |
| 110 | buffer with \\<mh-folder-mode-map>\\[kill-buffer] or scan the entire folder | 112 | for the search. Therefore, if you want to search in all messages, |
| 111 | with \\[mh-rescan-folder]. | 113 | first kill the folder's buffer with |
| 112 | 114 | \\<mh-folder-mode-map>\\[kill-buffer] or scan the entire folder with | |
| 113 | If you find that you do the same thing over and over when editing the search | 115 | \\[mh-rescan-folder]. |
| 114 | template, you may wish to bind some shortcuts to keys. This can be done with | 116 | |
| 115 | the variable `mh-pick-mode-hook', which is called when \\[mh-search-folder] is | 117 | If you find that you do the same thing over and over when editing the |
| 116 | run on a new pattern. | 118 | search template, you may wish to bind some shortcuts to keys. This can |
| 117 | 119 | be done with the variable `mh-pick-mode-hook', which is called when | |
| 118 | If you have run the \\[mh-index-search] command, but change your mind while | 120 | \\[mh-search-folder] is run on a new pattern. |
| 119 | entering the search criteria and actually want to run a regular search, then | 121 | |
| 120 | you can use the \\<mh-pick-mode-map>\\[mh-pick-do-search] command. | 122 | If you have run the \\[mh-index-search] command, but change your mind |
| 121 | 123 | while entering the search criteria and actually want to run a regular | |
| 122 | In a program, argument WINDOW-CONFIG is the current window configuration and | 124 | search, then you can use the \\<mh-pick-mode-map>\\[mh-pick-do-search] |
| 123 | is used when the search folder is dismissed." | 125 | command. |
| 126 | |||
| 127 | In a program, argument WINDOW-CONFIG is the current window | ||
| 128 | configuration and is used when the search folder is dismissed." | ||
| 124 | (interactive (list (mh-prompt-for-folder "Search" mh-current-folder nil nil t) | 129 | (interactive (list (mh-prompt-for-folder "Search" mh-current-folder nil nil t) |
| 125 | (current-window-configuration))) | 130 | (current-window-configuration))) |
| 126 | (let ((pick-folder (if (equal folder "+") mh-current-folder folder))) | 131 | (let ((pick-folder (if (equal folder "+") mh-current-folder folder))) |
| @@ -182,26 +187,26 @@ is used when the search folder is dismissed." | |||
| 182 | "where <field> is the first letter of the desired field.")) | 187 | "where <field> is the first letter of the desired field.")) |
| 183 | "Key binding cheat sheet. | 188 | "Key binding cheat sheet. |
| 184 | 189 | ||
| 185 | This is an associative array which is used to show the most common commands. | 190 | This is an associative array which is used to show the most common |
| 186 | The key is a prefix char. The value is one or more strings which are | 191 | commands. The key is a prefix char. The value is one or more strings |
| 187 | concatenated together and displayed in the minibuffer if ? is pressed after | 192 | which are concatenated together and displayed in the minibuffer if ? |
| 188 | the prefix character. The special key nil is used to display the | 193 | is pressed after the prefix character. The special key nil is used to |
| 189 | non-prefixed commands. | 194 | display the non-prefixed commands. |
| 190 | 195 | ||
| 191 | The substitutions described in `substitute-command-keys' are performed as | 196 | The substitutions described in `substitute-command-keys' are performed |
| 192 | well.") | 197 | as well.") |
| 193 | 198 | ||
| 194 | (put 'mh-pick-mode 'mode-class 'special) | 199 | (put 'mh-pick-mode 'mode-class 'special) |
| 195 | 200 | ||
| 196 | (define-derived-mode mh-pick-mode fundamental-mode "MH-Pick" | 201 | (define-derived-mode mh-pick-mode fundamental-mode "MH-Pick" |
| 197 | "Mode for creating search templates in MH-E.\\<mh-pick-mode-map> | 202 | "Mode for creating search templates in MH-E.\\<mh-pick-mode-map> |
| 198 | 203 | ||
| 199 | After each field name, enter the pattern to search for. If a field's | 204 | After each field name, enter the pattern to search for. If a field's |
| 200 | value does not matter for the search, leave it empty. To search the | 205 | value does not matter for the search, leave it empty. To search the |
| 201 | entire message, supply the pattern in the \"body\" of the template. | 206 | entire message, supply the pattern in the \"body\" of the template. |
| 202 | Each non-empty field must be matched for a message to be selected. | 207 | Each non-empty field must be matched for a message to be selected. To |
| 203 | To effect a logical \"or\", use \\[mh-search-folder] multiple times. | 208 | effect a logical \"or\", use \\[mh-search-folder] multiple times. When |
| 204 | When you have finished, type \\[mh-pick-do-search] to do the search. | 209 | you have finished, type \\[mh-pick-do-search] to do the search. |
| 205 | 210 | ||
| 206 | The hook `mh-pick-mode-hook' is called upon entry to this mode. | 211 | The hook `mh-pick-mode-hook' is called upon entry to this mode. |
| 207 | 212 | ||
| @@ -216,8 +221,10 @@ The hook `mh-pick-mode-hook' is called upon entry to this mode. | |||
| 216 | ;;;###mh-autoload | 221 | ;;;###mh-autoload |
| 217 | (defun mh-pick-do-search () | 222 | (defun mh-pick-do-search () |
| 218 | "Find messages that match the qualifications in the current pattern buffer. | 223 | "Find messages that match the qualifications in the current pattern buffer. |
| 219 | Messages are searched for in the folder named in `mh-searching-folder'. | 224 | |
| 220 | Add the messages found to the sequence named `search'." | 225 | Messages are searched for in the folder named in |
| 226 | `mh-searching-folder'. Add the messages found to the sequence | ||
| 227 | named `search'." | ||
| 221 | (interactive) | 228 | (interactive) |
| 222 | (let ((pattern-list (mh-pick-parse-search-buffer)) | 229 | (let ((pattern-list (mh-pick-parse-search-buffer)) |
| 223 | (folder mh-searching-folder) | 230 | (folder mh-searching-folder) |
| @@ -251,9 +258,11 @@ Add the messages found to the sequence named `search'." | |||
| 251 | ;;;###mh-autoload | 258 | ;;;###mh-autoload |
| 252 | (defun mh-do-search () | 259 | (defun mh-do-search () |
| 253 | "Use the default searching function. | 260 | "Use the default searching function. |
| 254 | If \\[mh-search-folder] was used to create the search pattern then pick is used | 261 | |
| 255 | to search the folder. Otherwise if \\[mh-index-search] was used then the | 262 | If \\[mh-search-folder] was used to create the search pattern |
| 256 | indexing program specified in `mh-index-program' is used." | 263 | then pick is used to search the folder. Otherwise if |
| 264 | \\[mh-index-search] was used then the indexing program specified | ||
| 265 | in `mh-index-program' is used." | ||
| 257 | (interactive) | 266 | (interactive) |
| 258 | (if (symbolp mh-searching-function) | 267 | (if (symbolp mh-searching-function) |
| 259 | (funcall mh-searching-function) | 268 | (funcall mh-searching-function) |
| @@ -261,8 +270,8 @@ indexing program specified in `mh-index-program' is used." | |||
| 261 | 270 | ||
| 262 | (defun mh-seq-from-command (folder seq command) | 271 | (defun mh-seq-from-command (folder seq command) |
| 263 | "In FOLDER, make a sequence named SEQ by executing COMMAND. | 272 | "In FOLDER, make a sequence named SEQ by executing COMMAND. |
| 264 | COMMAND is a list. The first element is a program name | 273 | COMMAND is a list. The first element is a program name and the |
| 265 | and the subsequent elements are its arguments, all strings." | 274 | subsequent elements are its arguments, all strings." |
| 266 | (let ((msg) | 275 | (let ((msg) |
| 267 | (msgs ()) | 276 | (msgs ()) |
| 268 | (case-fold-search t)) | 277 | (case-fold-search t)) |
| @@ -279,9 +288,9 @@ and the subsequent elements are its arguments, all strings." | |||
| 279 | 288 | ||
| 280 | (defun mh-pick-parse-search-buffer () | 289 | (defun mh-pick-parse-search-buffer () |
| 281 | "Parse the search buffer contents. | 290 | "Parse the search buffer contents. |
| 282 | The function returns a alist. The car of each element is either the header name | 291 | The function returns a alist. The car of each element is either |
| 283 | to search in or nil to search the whole message. The cdr of the element is the | 292 | the header name to search in or nil to search the whole message. |
| 284 | pattern to search." | 293 | The cdr of the element is the pattern to search." |
| 285 | (save-excursion | 294 | (save-excursion |
| 286 | (let ((pattern-list ()) | 295 | (let ((pattern-list ()) |
| 287 | (in-body-flag nil) | 296 | (in-body-flag nil) |
diff --git a/lisp/mh-e/mh-print.el b/lisp/mh-e/mh-print.el index acca58c494f..a4d53731c72 100644 --- a/lisp/mh-e/mh-print.el +++ b/lisp/mh-e/mh-print.el | |||
| @@ -47,8 +47,8 @@ Valid values are: | |||
| 47 | black-white - Print colors on black/white printer. | 47 | black-white - Print colors on black/white printer. |
| 48 | See also `ps-black-white-faces'. | 48 | See also `ps-black-white-faces'. |
| 49 | 49 | ||
| 50 | Any other value is treated as t. This variable is initialized from | 50 | Any other value is treated as t. This variable is initialized |
| 51 | `ps-print-color-p'.") | 51 | from `ps-print-color-p'.") |
| 52 | 52 | ||
| 53 | (defvar mh-ps-print-func 'ps-spool-buffer-with-faces | 53 | (defvar mh-ps-print-func 'ps-spool-buffer-with-faces |
| 54 | "Function to use to spool a buffer. | 54 | "Function to use to spool a buffer. |
| @@ -108,20 +108,22 @@ Pass along the PREFIX-ARG to it." | |||
| 108 | (defun mh-ps-print-msg (range) | 108 | (defun mh-ps-print-msg (range) |
| 109 | "Print RANGE\\<mh-folder-mode-map>. | 109 | "Print RANGE\\<mh-folder-mode-map>. |
| 110 | 110 | ||
| 111 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 111 | Check the documentation of `mh-interactive-range' to see how RANGE is |
| 112 | interactive use. | 112 | read in interactive use. |
| 113 | 113 | ||
| 114 | This command will print inline text attachments but will not decrypt messages. | 114 | This command will print inline text attachments but will not decrypt |
| 115 | However, when a message is displayed in an MH-Show buffer, then that buffer is | 115 | messages. However, when a message is displayed in an MH-Show buffer, |
| 116 | used verbatim for printing with the caveat that only text attachments, if | 116 | then that buffer is used verbatim for printing with the caveat that |
| 117 | opened inline, are printed. Therefore, encrypted messages can be printed by | 117 | only text attachments, if opened inline, are printed. Therefore, |
| 118 | showing and decrypting them first. | 118 | encrypted messages can be printed by showing and decrypting them |
| 119 | 119 | first. | |
| 120 | MH-E uses the \"ps-print\" package to do the printing, so you can customize | 120 | |
| 121 | the printing further by going to the `ps-print' customization group. This | 121 | MH-E uses the \"ps-print\" package to do the printing, so you can |
| 122 | command does not use the options `mh-lpr-command-format' or | 122 | customize the printing further by going to the `ps-print' |
| 123 | `mh-print-background-flag'. See also the commands \\[mh-ps-print-toggle-color] | 123 | customization group. This command does not use the options |
| 124 | and \\[mh-ps-print-toggle-faces]." | 124 | `mh-lpr-command-format' or `mh-print-background-flag'. See also the |
| 125 | commands \\[mh-ps-print-toggle-color] and | ||
| 126 | \\[mh-ps-print-toggle-faces]." | ||
| 125 | (interactive (list (mh-interactive-range "Print"))) | 127 | (interactive (list (mh-interactive-range "Print"))) |
| 126 | (mh-ps-print-range range nil)) | 128 | (mh-ps-print-range range nil)) |
| 127 | 129 | ||
| @@ -129,20 +131,22 @@ and \\[mh-ps-print-toggle-faces]." | |||
| 129 | (defun mh-ps-print-msg-file (range file) | 131 | (defun mh-ps-print-msg-file (range file) |
| 130 | "Print RANGE to FILE\\<mh-folder-mode-map>. | 132 | "Print RANGE to FILE\\<mh-folder-mode-map>. |
| 131 | 133 | ||
| 132 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 134 | Check the documentation of `mh-interactive-range' to see how RANGE is |
| 133 | interactive use. | 135 | read in interactive use. |
| 134 | 136 | ||
| 135 | This command will print inline text attachments but will not decrypt messages. | 137 | This command will print inline text attachments but will not decrypt |
| 136 | However, when a message is displayed in an MH-Show buffer, then that buffer is | 138 | messages. However, when a message is displayed in an MH-Show buffer, |
| 137 | used verbatim for printing with the caveat that only text attachments, if | 139 | then that buffer is used verbatim for printing with the caveat that |
| 138 | opened inline, are printed. Therefore, encrypted messages can be printed by | 140 | only text attachments, if opened inline, are printed. Therefore, |
| 139 | showing and decrypting them first. | 141 | encrypted messages can be printed by showing and decrypting them |
| 140 | 142 | first. | |
| 141 | MH-E uses the \"ps-print\" package to do the printing, so you can customize | 143 | |
| 142 | the printing further by going to the `ps-print' customization group. This | 144 | MH-E uses the \"ps-print\" package to do the printing, so you can |
| 143 | command does not use the options `mh-lpr-command-format' or | 145 | customize the printing further by going to the `ps-print' |
| 144 | `mh-print-background-flag'. See also the commands \\[mh-ps-print-toggle-color] | 146 | customization group. This command does not use the options |
| 145 | and \\[mh-ps-print-toggle-faces]." | 147 | `mh-lpr-command-format' or `mh-print-background-flag'. See also the |
| 148 | commands \\[mh-ps-print-toggle-color] and | ||
| 149 | \\[mh-ps-print-toggle-faces]." | ||
| 146 | (interactive (list (mh-interactive-range "Print") (mh-ps-print-preprint 1))) | 150 | (interactive (list (mh-interactive-range "Print") (mh-ps-print-preprint 1))) |
| 147 | (mh-ps-print-range range file)) | 151 | (mh-ps-print-range range file)) |
| 148 | 152 | ||
| @@ -150,8 +154,8 @@ and \\[mh-ps-print-toggle-faces]." | |||
| 150 | (defun mh-ps-print-toggle-faces () | 154 | (defun mh-ps-print-toggle-faces () |
| 151 | "Toggle whether printing is done with faces or not. | 155 | "Toggle whether printing is done with faces or not. |
| 152 | 156 | ||
| 153 | When faces are enabled, the printed message will look very similar to the | 157 | When faces are enabled, the printed message will look very |
| 154 | message in the MH-Show buffer." | 158 | similar to the message in the MH-Show buffer." |
| 155 | (interactive) | 159 | (interactive) |
| 156 | (if (eq mh-ps-print-func 'ps-spool-buffer-with-faces) | 160 | (if (eq mh-ps-print-func 'ps-spool-buffer-with-faces) |
| 157 | (progn | 161 | (progn |
| @@ -164,13 +168,13 @@ message in the MH-Show buffer." | |||
| 164 | (defun mh-ps-print-toggle-color () | 168 | (defun mh-ps-print-toggle-color () |
| 165 | "Toggle whether color is used in printing messages. | 169 | "Toggle whether color is used in printing messages. |
| 166 | 170 | ||
| 167 | Colors are emulated on black-and-white printers with shades of gray. This | 171 | Colors are emulated on black-and-white printers with shades of |
| 168 | might produce illegible output, even if your screen colors only use shades of | 172 | gray. This might produce illegible output, even if your screen |
| 169 | gray. If this is the case, try using this command to toggle between color, no | 173 | colors only use shades of gray. If this is the case, try using |
| 170 | color, and a black and white representation of the colors and see which works | 174 | this command to toggle between color, no color, and a black and |
| 171 | best. You change this setting permanently by customizing the option | 175 | white representation of the colors and see which works best. You |
| 176 | change this setting permanently by customizing the option | ||
| 172 | `ps-print-color-p'." | 177 | `ps-print-color-p'." |
| 173 | |||
| 174 | (interactive) | 178 | (interactive) |
| 175 | (if (eq mh-ps-print-color-option nil) | 179 | (if (eq mh-ps-print-color-option nil) |
| 176 | (progn | 180 | (progn |
| @@ -188,11 +192,12 @@ best. You change this setting permanently by customizing the option | |||
| 188 | (defun mh-print-msg (range) | 192 | (defun mh-print-msg (range) |
| 189 | "Print RANGE the old fashioned way\\<mh-folder-mode-map>. | 193 | "Print RANGE the old fashioned way\\<mh-folder-mode-map>. |
| 190 | 194 | ||
| 191 | The message is formatted with \"mhl\" (see option `mh-mhl-format-file') and | 195 | The message is formatted with \"mhl\" (see option |
| 192 | printed with the \"lpr\" command (see option `mh-lpr-command-format'). | 196 | `mh-mhl-format-file') and printed with the \"lpr\" command (see |
| 197 | option `mh-lpr-command-format'). | ||
| 193 | 198 | ||
| 194 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 199 | Check the documentation of `mh-interactive-range' to see how |
| 195 | interactive use. | 200 | RANGE is read in interactive use. |
| 196 | 201 | ||
| 197 | Consider using \\[mh-ps-print-msg] instead." | 202 | Consider using \\[mh-ps-print-msg] instead." |
| 198 | (interactive (list (mh-interactive-range "Print"))) | 203 | (interactive (list (mh-interactive-range "Print"))) |
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el index 4942df58f71..956115da7bb 100644 --- a/lisp/mh-e/mh-seq.el +++ b/lisp/mh-e/mh-seq.el | |||
| @@ -122,16 +122,18 @@ | |||
| 122 | "Map of message index to various parts of the scan line.") | 122 | "Map of message index to various parts of the scan line.") |
| 123 | (defvar mh-thread-scan-line-map-stack nil | 123 | (defvar mh-thread-scan-line-map-stack nil |
| 124 | "Old map of message index to various parts of the scan line. | 124 | "Old map of message index to various parts of the scan line. |
| 125 | This is the original map that is stored when the folder is narrowed.") | 125 | This is the original map that is stored when the folder is |
| 126 | narrowed.") | ||
| 126 | (defvar mh-thread-subject-container-hash nil | 127 | (defvar mh-thread-subject-container-hash nil |
| 127 | "Hashtable used to group messages by subject.") | 128 | "Hashtable used to group messages by subject.") |
| 128 | (defvar mh-thread-duplicates nil | 129 | (defvar mh-thread-duplicates nil |
| 129 | "Hashtable used to associate messages with the same message identifier.") | 130 | "Hashtable used to associate messages with the same message identifier.") |
| 130 | (defvar mh-thread-history () | 131 | (defvar mh-thread-history () |
| 131 | "Variable to remember the transformations to the thread tree. | 132 | "Variable to remember the transformations to the thread tree. |
| 132 | When new messages are added, these transformations are rewound, then the | 133 | When new messages are added, these transformations are rewound, |
| 133 | links are added from the newly seen messages. Finally the transformations are | 134 | then the links are added from the newly seen messages. Finally |
| 134 | redone to get the new thread tree. This makes incremental threading easier.") | 135 | the transformations are redone to get the new thread tree. This |
| 136 | makes incremental threading easier.") | ||
| 135 | (defvar mh-thread-body-width nil | 137 | (defvar mh-thread-body-width nil |
| 136 | "Width of scan substring that contains subject and body of message.") | 138 | "Width of scan substring that contains subject and body of message.") |
| 137 | 139 | ||
| @@ -150,9 +152,10 @@ redone to get the new thread tree. This makes incremental threading easier.") | |||
| 150 | (defun mh-delete-seq (sequence) | 152 | (defun mh-delete-seq (sequence) |
| 151 | "Delete SEQUENCE. | 153 | "Delete SEQUENCE. |
| 152 | 154 | ||
| 153 | You are prompted for the sequence to delete. Note that this deletes only the | 155 | You are prompted for the sequence to delete. Note that this |
| 154 | sequence, not the messages in the sequence. If you want to delete the | 156 | deletes only the sequence, not the messages in the sequence. If |
| 155 | messages, use \"\\[universal-argument] \\[mh-delete-msg]\"." | 157 | you want to delete the messages, use \"\\[universal-argument] |
| 158 | \\[mh-delete-msg]\"." | ||
| 156 | (interactive (list (mh-read-seq-default "Delete" t))) | 159 | (interactive (list (mh-read-seq-default "Delete" t))) |
| 157 | (let ((msg-list (mh-seq-to-msgs sequence)) | 160 | (let ((msg-list (mh-seq-to-msgs sequence)) |
| 158 | (internal-flag (mh-internal-seq sequence)) | 161 | (internal-flag (mh-internal-seq sequence)) |
| @@ -216,8 +219,8 @@ The list appears in a buffer named \"*MH-E Sequences*\"." | |||
| 216 | ;;;###mh-autoload | 219 | ;;;###mh-autoload |
| 217 | (defun mh-msg-is-in-seq (message) | 220 | (defun mh-msg-is-in-seq (message) |
| 218 | "Display the sequences in which the current message appears. | 221 | "Display the sequences in which the current message appears. |
| 219 | Use a prefix argument to display the sequences in which another MESSAGE | 222 | Use a prefix argument to display the sequences in which another |
| 220 | appears." | 223 | MESSAGE appears." |
| 221 | (interactive "P") | 224 | (interactive "P") |
| 222 | (if (not message) | 225 | (if (not message) |
| 223 | (setq message (mh-get-msg-num t))) | 226 | (setq message (mh-get-msg-num t))) |
| @@ -243,11 +246,13 @@ appears." | |||
| 243 | (defun mh-narrow-to-seq (sequence) | 246 | (defun mh-narrow-to-seq (sequence) |
| 244 | "Restrict display to messages in SEQUENCE. | 247 | "Restrict display to messages in SEQUENCE. |
| 245 | 248 | ||
| 246 | You are prompted for the name of the sequence. What this command does is show | 249 | You are prompted for the name of the sequence. What this command |
| 247 | only those messages that are in the selected sequence in the MH-Folder buffer. | 250 | does is show only those messages that are in the selected |
| 248 | In addition, it limits further MH-E searches to just those messages. | 251 | sequence in the MH-Folder buffer. In addition, it limits further |
| 252 | MH-E searches to just those messages. | ||
| 249 | 253 | ||
| 250 | When you want to widen the view to all your messages again, use \\[mh-widen]." | 254 | When you want to widen the view to all your messages again, use |
| 255 | \\[mh-widen]." | ||
| 251 | (interactive (list (mh-read-seq "Narrow to" t))) | 256 | (interactive (list (mh-read-seq "Narrow to" t))) |
| 252 | (with-mh-folder-updating (t) | 257 | (with-mh-folder-updating (t) |
| 253 | (cond ((mh-seq-to-msgs sequence) | 258 | (cond ((mh-seq-to-msgs sequence) |
| @@ -283,14 +288,17 @@ When you want to widen the view to all your messages again, use \\[mh-widen]." | |||
| 283 | (defun mh-put-msg-in-seq (range sequence) | 288 | (defun mh-put-msg-in-seq (range sequence) |
| 284 | "Add RANGE to SEQUENCE\\<mh-folder-mode-map>. | 289 | "Add RANGE to SEQUENCE\\<mh-folder-mode-map>. |
| 285 | 290 | ||
| 286 | To place a message in a sequence, use this command to do it manually, or use | 291 | To place a message in a sequence, use this command to do it |
| 287 | the MH command \"pick\" or the MH-E version of \"pick\", \\[mh-search-folder], | 292 | manually, or use the MH command \"pick\" or the MH-E version of |
| 288 | which create a sequence automatically. | 293 | \"pick\", \\[mh-search-folder], which create a sequence |
| 289 | 294 | automatically. | |
| 290 | Give this command a RANGE and you can add all the messages in a sequence to | 295 | |
| 291 | another sequence (for example, \"\\[universal-argument] \\[mh-put-msg-in-seq] | 296 | Give this command a RANGE and you can add all the messages in a |
| 292 | SourceSequence RET DestSequence RET\"). Check the documentation of | 297 | sequence to another sequence (for example, |
| 293 | `mh-interactive-range' to see how RANGE is read in interactive use." | 298 | \"\\[universal-argument] \\[mh-put-msg-in-seq] SourceSequence RET |
| 299 | DestSequence RET\"). Check the documentation of | ||
| 300 | `mh-interactive-range' to see how RANGE is read in interactive | ||
| 301 | use." | ||
| 294 | (interactive (list (mh-interactive-range "Add messages from") | 302 | (interactive (list (mh-interactive-range "Add messages from") |
| 295 | (mh-read-seq-default "Add to" nil))) | 303 | (mh-read-seq-default "Add to" nil))) |
| 296 | (unless (mh-valid-seq-p sequence) | 304 | (unless (mh-valid-seq-p sequence) |
| @@ -321,7 +329,8 @@ OP is one of 'widen and 'unthread." | |||
| 321 | ;;;###mh-autoload | 329 | ;;;###mh-autoload |
| 322 | (defun mh-widen (&optional all-flag) | 330 | (defun mh-widen (&optional all-flag) |
| 323 | "Remove last restriction. | 331 | "Remove last restriction. |
| 324 | If optional prefix argument ALL-FLAG is non-nil, remove all limits." | 332 | If optional prefix argument ALL-FLAG is non-nil, remove all |
| 333 | limits." | ||
| 325 | (interactive "P") | 334 | (interactive "P") |
| 326 | (let ((msg (mh-get-msg-num nil))) | 335 | (let ((msg (mh-get-msg-num nil))) |
| 327 | (when mh-folder-view-stack | 336 | (when mh-folder-view-stack |
| @@ -368,8 +377,8 @@ If optional prefix argument ALL-FLAG is non-nil, remove all limits." | |||
| 368 | ;;;###mh-autoload | 377 | ;;;###mh-autoload |
| 369 | (defun mh-notate-deleted-and-refiled () | 378 | (defun mh-notate-deleted-and-refiled () |
| 370 | "Notate messages marked for deletion or refiling. | 379 | "Notate messages marked for deletion or refiling. |
| 371 | Messages to be deleted are given by `mh-delete-list' while messages to be | 380 | Messages to be deleted are given by `mh-delete-list' while |
| 372 | refiled are present in `mh-refile-list'." | 381 | messages to be refiled are present in `mh-refile-list'." |
| 373 | (let ((refiled-hash (make-hash-table)) | 382 | (let ((refiled-hash (make-hash-table)) |
| 374 | (deleted-hash (make-hash-table))) | 383 | (deleted-hash (make-hash-table))) |
| 375 | (dolist (msg mh-delete-list) | 384 | (dolist (msg mh-delete-list) |
| @@ -395,17 +404,18 @@ refiled are present in `mh-refile-list'." | |||
| 395 | ;;;###mh-autoload | 404 | ;;;###mh-autoload |
| 396 | (defun mh-read-seq-default (prompt not-empty) | 405 | (defun mh-read-seq-default (prompt not-empty) |
| 397 | "Read and return sequence name with default narrowed or previous sequence. | 406 | "Read and return sequence name with default narrowed or previous sequence. |
| 398 | PROMPT is the prompt to use when reading. If NOT-EMPTY is non-nil then a | 407 | PROMPT is the prompt to use when reading. If NOT-EMPTY is non-nil |
| 399 | non-empty sequence is read." | 408 | then a non-empty sequence is read." |
| 400 | (mh-read-seq prompt not-empty | 409 | (mh-read-seq prompt not-empty |
| 401 | (or mh-last-seq-used | 410 | (or mh-last-seq-used |
| 402 | (car (mh-seq-containing-msg (mh-get-msg-num nil) nil))))) | 411 | (car (mh-seq-containing-msg (mh-get-msg-num nil) nil))))) |
| 403 | 412 | ||
| 404 | (defun mh-read-seq (prompt not-empty &optional default) | 413 | (defun mh-read-seq (prompt not-empty &optional default) |
| 405 | "Read and return a sequence name. | 414 | "Read and return a sequence name. |
| 406 | Prompt with PROMPT, raise an error if the sequence is empty and the NOT-EMPTY | 415 | Prompt with PROMPT, raise an error if the sequence is empty and |
| 407 | flag is non-nil, and supply an optional DEFAULT sequence. A reply of '%' | 416 | the NOT-EMPTY flag is non-nil, and supply an optional DEFAULT |
| 408 | defaults to the first sequence containing the current message." | 417 | sequence. A reply of '%' defaults to the first sequence |
| 418 | containing the current message." | ||
| 409 | (let* ((input (completing-read (format "%s %s %s" prompt "sequence:" | 419 | (let* ((input (completing-read (format "%s %s %s" prompt "sequence:" |
| 410 | (if default | 420 | (if default |
| 411 | (format "[%s] " default) | 421 | (format "[%s] " default) |
| @@ -459,35 +469,40 @@ completion is over." | |||
| 459 | expand-flag ask-flag number-as-range-flag) | 469 | expand-flag ask-flag number-as-range-flag) |
| 460 | "Read a message range with PROMPT. | 470 | "Read a message range with PROMPT. |
| 461 | 471 | ||
| 462 | If FOLDER is non-nil then a range is read from that folder, otherwise use | 472 | If FOLDER is non-nil then a range is read from that folder, otherwise |
| 463 | `mh-current-folder'. | 473 | use `mh-current-folder'. |
| 464 | 474 | ||
| 465 | If DEFAULT is a string then use that as default range to return. If DEFAULT is | 475 | If DEFAULT is a string then use that as default range to return. If |
| 466 | nil then ask user with default answer a range based on the sequences that seem | 476 | DEFAULT is nil then ask user with default answer a range based on the |
| 467 | relevant. Finally if DEFAULT is t, try to avoid prompting the user. Unseen | 477 | sequences that seem relevant. Finally if DEFAULT is t, try to avoid |
| 468 | messages, if present, are returned. If the folder has fewer than | 478 | prompting the user. Unseen messages, if present, are returned. If the |
| 469 | `mh-large-folder' messages then \"all\" messages are returned. Finally as a | 479 | folder has fewer than `mh-large-folder' messages then \"all\" messages |
| 470 | last resort prompt the user. | 480 | are returned. Finally as a last resort prompt the user. |
| 471 | 481 | ||
| 472 | If EXPAND-FLAG is non-nil then a list of message numbers corresponding to the | 482 | If EXPAND-FLAG is non-nil then a list of message numbers corresponding |
| 473 | input is returned. If this list is empty then an error is raised. If | 483 | to the input is returned. If this list is empty then an error is |
| 474 | EXPAND-FLAG is nil just return the input string. In this case we don't check | 484 | raised. If EXPAND-FLAG is nil just return the input string. In this |
| 475 | if the range is empty. | 485 | case we don't check if the range is empty. |
| 476 | 486 | ||
| 477 | If ASK-FLAG is non-nil, then the user is always queried for a range of | 487 | If ASK-FLAG is non-nil, then the user is always queried for a range of |
| 478 | messages. If ASK-FLAG is nil, then the function checks if the unseen sequence | 488 | messages. If ASK-FLAG is nil, then the function checks if the unseen |
| 479 | is non-empty. If that is the case, `mh-unseen-seq', or the list of messages in | 489 | sequence is non-empty. If that is the case, `mh-unseen-seq', or the |
| 480 | it depending on the value of EXPAND, is returned. Otherwise if the folder has | 490 | list of messages in it depending on the value of EXPAND, is returned. |
| 481 | fewer than `mh-large-folder' messages then the list of messages corresponding | 491 | Otherwise if the folder has fewer than `mh-large-folder' messages then |
| 482 | to \"all\" is returned. If neither of the above holds then as a last resort | 492 | the list of messages corresponding to \"all\" is returned. If neither |
| 483 | the user is queried for a range of messages. | 493 | of the above holds then as a last resort the user is queried for a |
| 494 | range of messages. | ||
| 484 | 495 | ||
| 485 | If NUMBER-AS-RANGE-FLAG is non-nil, then if a number, N is read as input, it | 496 | If NUMBER-AS-RANGE-FLAG is non-nil, then if a number, N is read as |
| 486 | is interpreted as the range \"last:N\". | 497 | input, it is interpreted as the range \"last:N\". |
| 498 | |||
| 499 | This function replaces the existing function `mh-read-msg-range'. | ||
| 500 | Calls to: | ||
| 487 | 501 | ||
| 488 | This function replaces the existing function `mh-read-msg-range'. Calls to: | ||
| 489 | (mh-read-msg-range folder flag) | 502 | (mh-read-msg-range folder flag) |
| 503 | |||
| 490 | should be replaced with: | 504 | should be replaced with: |
| 505 | |||
| 491 | (mh-read-range \"Suitable prompt\" folder t nil flag | 506 | (mh-read-range \"Suitable prompt\" folder t nil flag |
| 492 | mh-interpret-number-as-range-flag)" | 507 | mh-interpret-number-as-range-flag)" |
| 493 | (setq default (or default mh-last-seq-used | 508 | (setq default (or default mh-last-seq-used |
| @@ -565,8 +580,9 @@ should be replaced with: | |||
| 565 | ;;;###mh-autoload | 580 | ;;;###mh-autoload |
| 566 | (defun mh-notate-cur () | 581 | (defun mh-notate-cur () |
| 567 | "Mark the MH sequence cur. | 582 | "Mark the MH sequence cur. |
| 568 | In addition to notating the current message with `mh-note-cur' the function | 583 | In addition to notating the current message with `mh-note-cur' |
| 569 | uses `overlay-arrow-position' to put a marker in the fringe." | 584 | the function uses `overlay-arrow-position' to put a marker in the |
| 585 | fringe." | ||
| 570 | (let ((cur (car (mh-seq-to-msgs 'cur)))) | 586 | (let ((cur (car (mh-seq-to-msgs 'cur)))) |
| 571 | (when (and cur (mh-goto-msg cur t t)) | 587 | (when (and cur (mh-goto-msg cur t t)) |
| 572 | (beginning-of-line) | 588 | (beginning-of-line) |
| @@ -617,8 +633,9 @@ uses `overlay-arrow-position' to put a marker in the fringe." | |||
| 617 | ;;;###mh-autoload | 633 | ;;;###mh-autoload |
| 618 | (defmacro mh-iterate-on-messages-in-region (var begin end &rest body) | 634 | (defmacro mh-iterate-on-messages-in-region (var begin end &rest body) |
| 619 | "Iterate over region. | 635 | "Iterate over region. |
| 620 | VAR is bound to the message on the current line as we loop starting from BEGIN | 636 | |
| 621 | till END. In each step BODY is executed. | 637 | VAR is bound to the message on the current line as we loop |
| 638 | starting from BEGIN till END. In each step BODY is executed. | ||
| 622 | 639 | ||
| 623 | If VAR is nil then the loop is executed without any binding." | 640 | If VAR is nil then the loop is executed without any binding." |
| 624 | (unless (symbolp var) | 641 | (unless (symbolp var) |
| @@ -639,13 +656,14 @@ If VAR is nil then the loop is executed without any binding." | |||
| 639 | (defmacro mh-iterate-on-range (var range &rest body) | 656 | (defmacro mh-iterate-on-range (var range &rest body) |
| 640 | "Iterate an operation over a region or sequence. | 657 | "Iterate an operation over a region or sequence. |
| 641 | 658 | ||
| 642 | VAR is bound to each message in turn in a loop over RANGE, which can be a | 659 | VAR is bound to each message in turn in a loop over RANGE, which |
| 643 | message number, a list of message numbers, a sequence, a region in a cons | 660 | can be a message number, a list of message numbers, a sequence, a |
| 644 | cell, or a MH range (something like last:20) in a string. In each iteration, | 661 | region in a cons cell, or a MH range (something like last:20) in |
| 645 | BODY is executed. | 662 | a string. In each iteration, BODY is executed. |
| 646 | 663 | ||
| 647 | The parameter RANGE is usually created with `mh-interactive-range' | 664 | The parameter RANGE is usually created with |
| 648 | in order to provide a uniform interface to MH-E functions." | 665 | `mh-interactive-range' in order to provide a uniform interface to |
| 666 | MH-E functions." | ||
| 649 | (unless (symbolp var) | 667 | (unless (symbolp var) |
| 650 | (error "Can not bind the non-symbol %s" var)) | 668 | (error "Can not bind the non-symbol %s" var)) |
| 651 | (let ((binding-needed-flag var) | 669 | (let ((binding-needed-flag var) |
| @@ -680,8 +698,8 @@ in order to provide a uniform interface to MH-E functions." | |||
| 680 | (defun mh-range-to-msg-list (range) | 698 | (defun mh-range-to-msg-list (range) |
| 681 | "Return a list of messages for RANGE. | 699 | "Return a list of messages for RANGE. |
| 682 | 700 | ||
| 683 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 701 | Check the documentation of `mh-interactive-range' to see how |
| 684 | interactive use." | 702 | RANGE is read in interactive use." |
| 685 | (let (msg-list) | 703 | (let (msg-list) |
| 686 | (mh-iterate-on-range msg range | 704 | (mh-iterate-on-range msg range |
| 687 | (push msg msg-list)) | 705 | (push msg msg-list)) |
| @@ -692,21 +710,21 @@ interactive use." | |||
| 692 | "Return interactive specification for message, sequence, range or region. | 710 | "Return interactive specification for message, sequence, range or region. |
| 693 | By convention, the name of this argument is RANGE. | 711 | By convention, the name of this argument is RANGE. |
| 694 | 712 | ||
| 695 | If variable `transient-mark-mode' is non-nil and the mark is active, then this | 713 | If variable `transient-mark-mode' is non-nil and the mark is active, |
| 696 | function returns a cons-cell of the region. | 714 | then this function returns a cons-cell of the region. |
| 697 | 715 | ||
| 698 | If optional prefix argument is provided, then prompt for message range with | 716 | If optional prefix argument is provided, then prompt for message range |
| 699 | RANGE-PROMPT. A list of messages in that range is returned. | 717 | with RANGE-PROMPT. A list of messages in that range is returned. |
| 700 | 718 | ||
| 701 | If a MH range is given, say something like last:20, then a list containing | 719 | If a MH range is given, say something like last:20, then a list |
| 702 | the messages in that range is returned. | 720 | containing the messages in that range is returned. |
| 703 | 721 | ||
| 704 | If DEFAULT non-nil then it is returned. | 722 | If DEFAULT non-nil then it is returned. |
| 705 | 723 | ||
| 706 | Otherwise, the message number at point is returned. | 724 | Otherwise, the message number at point is returned. |
| 707 | 725 | ||
| 708 | This function is usually used with `mh-iterate-on-range' in order to provide | 726 | This function is usually used with `mh-iterate-on-range' in order to |
| 709 | a uniform interface to MH-E functions." | 727 | provide a uniform interface to MH-E functions." |
| 710 | (cond ((mh-mark-active-p t) (cons (region-beginning) (region-end))) | 728 | (cond ((mh-mark-active-p t) (cons (region-beginning) (region-end))) |
| 711 | (current-prefix-arg (mh-read-range range-prompt nil nil t t)) | 729 | (current-prefix-arg (mh-read-range range-prompt nil nil t t)) |
| 712 | (default default) | 730 | (default default) |
| @@ -720,13 +738,17 @@ a uniform interface to MH-E functions." | |||
| 720 | ;; 41 for the max size of the subject part. Avoiding this would be desirable. | 738 | ;; 41 for the max size of the subject part. Avoiding this would be desirable. |
| 721 | (defun mh-subject-to-sequence (all) | 739 | (defun mh-subject-to-sequence (all) |
| 722 | "Put all following messages with same subject in sequence 'subject. | 740 | "Put all following messages with same subject in sequence 'subject. |
| 723 | If arg ALL is t, move to beginning of folder buffer to collect all messages. | 741 | If arg ALL is t, move to beginning of folder buffer to collect all |
| 742 | messages. | ||
| 724 | If arg ALL is nil, collect only messages fron current one on forward. | 743 | If arg ALL is nil, collect only messages fron current one on forward. |
| 725 | 744 | ||
| 726 | Return number of messages put in the sequence: | 745 | Return number of messages put in the sequence: |
| 727 | 746 | ||
| 728 | nil -> there was no subject line. | 747 | nil -> there was no subject line. |
| 729 | 0 -> there were no later messages with the same subject (sequence not made) | 748 | |
| 749 | 0 -> there were no later messages with the same | ||
| 750 | subject (sequence not made) | ||
| 751 | |||
| 730 | >1 -> the total number of messages including current one." | 752 | >1 -> the total number of messages including current one." |
| 731 | (if (memq 'unthread mh-view-ops) | 753 | (if (memq 'unthread mh-view-ops) |
| 732 | (mh-subject-to-sequence-threaded all) | 754 | (mh-subject-to-sequence-threaded all) |
| @@ -734,14 +756,17 @@ Return number of messages put in the sequence: | |||
| 734 | 756 | ||
| 735 | (defun mh-subject-to-sequence-unthreaded (all) | 757 | (defun mh-subject-to-sequence-unthreaded (all) |
| 736 | "Put all following messages with same subject in sequence 'subject. | 758 | "Put all following messages with same subject in sequence 'subject. |
| 737 | This function only works with an unthreaded folder. If arg ALL is t, move to | 759 | |
| 738 | beginning of folder buffer to collect all messages. If arg ALL is nil, collect | 760 | This function only works with an unthreaded folder. If arg ALL is |
| 739 | only messages fron current one on forward. | 761 | t, move to beginning of folder buffer to collect all messages. If |
| 762 | arg ALL is nil, collect only messages fron current one on | ||
| 763 | forward. | ||
| 740 | 764 | ||
| 741 | Return number of messages put in the sequence: | 765 | Return number of messages put in the sequence: |
| 742 | 766 | ||
| 743 | nil -> there was no subject line. | 767 | nil -> there was no subject line. |
| 744 | 0 -> there were no later messages with the same subject (sequence not made) | 768 | 0 -> there were no later messages with the same |
| 769 | subject (sequence not made) | ||
| 745 | >1 -> the total number of messages including current one." | 770 | >1 -> the total number of messages including current one." |
| 746 | (if (not (eq major-mode 'mh-folder-mode)) | 771 | (if (not (eq major-mode 'mh-folder-mode)) |
| 747 | (error "Not in a folder buffer")) | 772 | (error "Not in a folder buffer")) |
| @@ -782,12 +807,14 @@ Return number of messages put in the sequence: | |||
| 782 | 807 | ||
| 783 | (defun mh-subject-to-sequence-threaded (all) | 808 | (defun mh-subject-to-sequence-threaded (all) |
| 784 | "Put all messages with the same subject in the 'subject sequence. | 809 | "Put all messages with the same subject in the 'subject sequence. |
| 785 | This function works when the folder is threaded. In this situation the subject | ||
| 786 | could get truncated and so the normal matching doesn't work. | ||
| 787 | 810 | ||
| 788 | The parameter ALL is non-nil then all the messages in the buffer are | 811 | This function works when the folder is threaded. In this |
| 789 | considered, otherwise only the messages after the current one are taken into | 812 | situation the subject could get truncated and so the normal |
| 790 | account." | 813 | matching doesn't work. |
| 814 | |||
| 815 | The parameter ALL is non-nil then all the messages in the buffer | ||
| 816 | are considered, otherwise only the messages after the current one | ||
| 817 | are taken into account." | ||
| 791 | (let* ((cur (mh-get-msg-num nil)) | 818 | (let* ((cur (mh-get-msg-num nil)) |
| 792 | (subject (mh-thread-find-msg-subject cur)) | 819 | (subject (mh-thread-find-msg-subject cur)) |
| 793 | region msgs) | 820 | region msgs) |
| @@ -824,9 +851,9 @@ If no prefix arg is given, then return DEFAULT." | |||
| 824 | 851 | ||
| 825 | (defun mh-pick-args-list (s) | 852 | (defun mh-pick-args-list (s) |
| 826 | "Form list by grouping elements in string S suitable for pick arguments. | 853 | "Form list by grouping elements in string S suitable for pick arguments. |
| 827 | For example, the string \"-subject a b c -from Joe User <user@domain.com>\" | 854 | For example, the string \"-subject a b c -from Joe User |
| 828 | is converted to (\"-subject\" \"a b c\" \"-from\" | 855 | <user@domain.com>\" is converted to (\"-subject\" \"a b c\" |
| 829 | \"Joe User <user@domain.com>\"" | 856 | \"-from\" \"Joe User <user@domain.com>\"" |
| 830 | (let ((full-list (split-string s)) | 857 | (let ((full-list (split-string s)) |
| 831 | current-arg collection arg-list) | 858 | current-arg collection arg-list) |
| 832 | (while full-list | 859 | (while full-list |
| @@ -935,8 +962,8 @@ The MH command pick is used to do the match." | |||
| 935 | (defun mh-narrow-to-range (range) | 962 | (defun mh-narrow-to-range (range) |
| 936 | "Limit to RANGE. | 963 | "Limit to RANGE. |
| 937 | 964 | ||
| 938 | Check the documentation of `mh-interactive-range' to see how RANGE is read in | 965 | Check the documentation of `mh-interactive-range' to see how |
| 939 | interactive use. | 966 | RANGE is read in interactive use. |
| 940 | 967 | ||
| 941 | Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." | 968 | Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." |
| 942 | (interactive (list (mh-interactive-range "Narrow to"))) | 969 | (interactive (list (mh-interactive-range "Narrow to"))) |
| @@ -949,10 +976,11 @@ Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command." | |||
| 949 | (defun mh-delete-subject () | 976 | (defun mh-delete-subject () |
| 950 | "Delete messages with same subject\\<mh-folder-mode-map>. | 977 | "Delete messages with same subject\\<mh-folder-mode-map>. |
| 951 | 978 | ||
| 952 | To delete messages faster, you can use this command to delete all the messages | 979 | To delete messages faster, you can use this command to delete all |
| 953 | with the same subject as the current message. This command puts these messages | 980 | the messages with the same subject as the current message. This |
| 954 | in a sequence named \"subject\". You can undo this action by using \\[mh-undo] | 981 | command puts these messages in a sequence named \"subject\". You |
| 955 | with a prefix argument and then specifying the \"subject\" sequence." | 982 | can undo this action by using \\[mh-undo] with a prefix argument |
| 983 | and then specifying the \"subject\" sequence." | ||
| 956 | (interactive) | 984 | (interactive) |
| 957 | (let ((count (mh-subject-to-sequence nil))) | 985 | (let ((count (mh-subject-to-sequence nil))) |
| 958 | (cond | 986 | (cond |
| @@ -969,13 +997,14 @@ with a prefix argument and then specifying the \"subject\" sequence." | |||
| 969 | (defun mh-delete-subject-or-thread () | 997 | (defun mh-delete-subject-or-thread () |
| 970 | "Delete messages with same subject or thread\\<mh-folder-mode-map>. | 998 | "Delete messages with same subject or thread\\<mh-folder-mode-map>. |
| 971 | 999 | ||
| 972 | To delete messages faster, you can use this command to delete all the messages | 1000 | To delete messages faster, you can use this command to delete all |
| 973 | with the same subject as the current message. This command puts these messages | 1001 | the messages with the same subject as the current message. This |
| 974 | in a sequence named \"subject\". You can undo this action by using \\[mh-undo] | 1002 | command puts these messages in a sequence named \"subject\". You |
| 975 | with a prefix argument and then specifying the \"subject\" sequence. | 1003 | can undo this action by using \\[mh-undo] with a prefix argument |
| 1004 | and then specifying the \"subject\" sequence. | ||
| 976 | 1005 | ||
| 977 | However, if the buffer is displaying a threaded view of the folder then this | 1006 | However, if the buffer is displaying a threaded view of the |
| 978 | command behaves like \\[mh-thread-delete]." | 1007 | folder then this command behaves like \\[mh-thread-delete]." |
| 979 | (interactive) | 1008 | (interactive) |
| 980 | (if (memq 'unthread mh-view-ops) | 1009 | (if (memq 'unthread mh-view-ops) |
| 981 | (mh-thread-delete) | 1010 | (mh-thread-delete) |
| @@ -1005,8 +1034,8 @@ TEST is the test to use when creating a new hash table." | |||
| 1005 | 1034 | ||
| 1006 | (defsubst mh-thread-id-container (id) | 1035 | (defsubst mh-thread-id-container (id) |
| 1007 | "Given ID, return the corresponding container in `mh-thread-id-table'. | 1036 | "Given ID, return the corresponding container in `mh-thread-id-table'. |
| 1008 | If no container exists then a suitable container is created and the id-table | 1037 | If no container exists then a suitable container is created and |
| 1009 | is updated." | 1038 | the id-table is updated." |
| 1010 | (when (not id) | 1039 | (when (not id) |
| 1011 | (error "1")) | 1040 | (error "1")) |
| 1012 | (or (gethash id mh-thread-id-table) | 1041 | (or (gethash id mh-thread-id-table) |
| @@ -1027,9 +1056,9 @@ is updated." | |||
| 1027 | 1056 | ||
| 1028 | (defsubst mh-thread-add-link (parent child &optional at-end-p) | 1057 | (defsubst mh-thread-add-link (parent child &optional at-end-p) |
| 1029 | "Add links so that PARENT becomes a parent of CHILD. | 1058 | "Add links so that PARENT becomes a parent of CHILD. |
| 1030 | Doesn't make any changes if CHILD is already an ancestor of PARENT. If | 1059 | Doesn't make any changes if CHILD is already an ancestor of |
| 1031 | optional argument AT-END-P is non-nil, the CHILD is added to the end of the | 1060 | PARENT. If optional argument AT-END-P is non-nil, the CHILD is |
| 1032 | children list of PARENT." | 1061 | added to the end of the children list of PARENT." |
| 1033 | (let ((parent-container (cond ((null parent) nil) | 1062 | (let ((parent-container (cond ((null parent) nil) |
| 1034 | ((mh-thread-container-p parent) parent) | 1063 | ((mh-thread-container-p parent) parent) |
| 1035 | (t (mh-thread-id-container parent)))) | 1064 | (t (mh-thread-id-container parent)))) |
| @@ -1053,8 +1082,8 @@ children list of PARENT." | |||
| 1053 | 1082 | ||
| 1054 | (defun mh-thread-ancestor-p (ancestor successor) | 1083 | (defun mh-thread-ancestor-p (ancestor successor) |
| 1055 | "Return t if ANCESTOR is really an ancestor of SUCCESSOR and nil otherwise. | 1084 | "Return t if ANCESTOR is really an ancestor of SUCCESSOR and nil otherwise. |
| 1056 | In the limit, the function returns t if ANCESTOR and SUCCESSOR are the same | 1085 | In the limit, the function returns t if ANCESTOR and SUCCESSOR |
| 1057 | containers." | 1086 | are the same containers." |
| 1058 | (block nil | 1087 | (block nil |
| 1059 | (while successor | 1088 | (while successor |
| 1060 | (when (eq ancestor successor) (return t)) | 1089 | (when (eq ancestor successor) (return t)) |
| @@ -1063,7 +1092,8 @@ containers." | |||
| 1063 | 1092 | ||
| 1064 | (defsubst mh-thread-get-message-container (message) | 1093 | (defsubst mh-thread-get-message-container (message) |
| 1065 | "Return container which has MESSAGE in it. | 1094 | "Return container which has MESSAGE in it. |
| 1066 | If there is no container present then a new container is allocated." | 1095 | If there is no container present then a new container is |
| 1096 | allocated." | ||
| 1067 | (let* ((id (mh-message-id message)) | 1097 | (let* ((id (mh-message-id message)) |
| 1068 | (container (gethash id mh-thread-id-table))) | 1098 | (container (gethash id mh-thread-id-table))) |
| 1069 | (cond (container (setf (mh-container-message container) message) | 1099 | (cond (container (setf (mh-container-message container) message) |
| @@ -1073,8 +1103,8 @@ If there is no container present then a new container is allocated." | |||
| 1073 | 1103 | ||
| 1074 | (defsubst mh-thread-get-message (id subject-re-p subject refs) | 1104 | (defsubst mh-thread-get-message (id subject-re-p subject refs) |
| 1075 | "Return appropriate message. | 1105 | "Return appropriate message. |
| 1076 | Otherwise update message already present to have the proper ID, SUBJECT-RE-P, | 1106 | Otherwise update message already present to have the proper ID, |
| 1077 | SUBJECT and REFS fields." | 1107 | SUBJECT-RE-P, SUBJECT and REFS fields." |
| 1078 | (let* ((container (gethash id mh-thread-id-table)) | 1108 | (let* ((container (gethash id mh-thread-id-table)) |
| 1079 | (message (if container (mh-container-message container) nil))) | 1109 | (message (if container (mh-container-message container) nil))) |
| 1080 | (cond (message | 1110 | (cond (message |
| @@ -1103,9 +1133,10 @@ This allows cheap string comparison with EQ." | |||
| 1103 | 1133 | ||
| 1104 | (defsubst mh-thread-prune-subject (subject) | 1134 | (defsubst mh-thread-prune-subject (subject) |
| 1105 | "Prune leading Re:'s, Fwd:'s etc. and trailing (fwd)'s from SUBJECT. | 1135 | "Prune leading Re:'s, Fwd:'s etc. and trailing (fwd)'s from SUBJECT. |
| 1106 | If the result after pruning is not the empty string then it is canonicalized | 1136 | If the result after pruning is not the empty string then it is |
| 1107 | so that subjects can be tested for equality with eq. This is done so that all | 1137 | canonicalized so that subjects can be tested for equality with |
| 1108 | the messages without a subject are not put into a single thread." | 1138 | eq. This is done so that all the messages without a subject are |
| 1139 | not put into a single thread." | ||
| 1109 | (let ((case-fold-search t) | 1140 | (let ((case-fold-search t) |
| 1110 | (subject-pruned-flag nil)) | 1141 | (subject-pruned-flag nil)) |
| 1111 | ;; Prune subject leader | 1142 | ;; Prune subject leader |
| @@ -1128,7 +1159,8 @@ the messages without a subject are not put into a single thread." | |||
| 1128 | 1159 | ||
| 1129 | (defun mh-thread-container-subject (container) | 1160 | (defun mh-thread-container-subject (container) |
| 1130 | "Return the subject of CONTAINER. | 1161 | "Return the subject of CONTAINER. |
| 1131 | If CONTAINER is empty return the subject info of one of its children." | 1162 | If CONTAINER is empty return the subject info of one of its |
| 1163 | children." | ||
| 1132 | (cond ((and (mh-container-message container) | 1164 | (cond ((and (mh-container-message container) |
| 1133 | (mh-message-id (mh-container-message container))) | 1165 | (mh-message-id (mh-container-message container))) |
| 1134 | (mh-message-subject (mh-container-message container))) | 1166 | (mh-message-subject (mh-container-message container))) |
| @@ -1233,8 +1265,8 @@ If CONTAINER is empty return the subject info of one of its children." | |||
| 1233 | 1265 | ||
| 1234 | (defsubst mh-thread-group-by-subject (roots) | 1266 | (defsubst mh-thread-group-by-subject (roots) |
| 1235 | "Group the set of message containers, ROOTS based on subject. | 1267 | "Group the set of message containers, ROOTS based on subject. |
| 1236 | Bug: Check for and make sure that something without Re: is made the parent in | 1268 | Bug: Check for and make sure that something without Re: is made |
| 1237 | preference to something that has it." | 1269 | the parent in preference to something that has it." |
| 1238 | (clrhash mh-thread-subject-container-hash) | 1270 | (clrhash mh-thread-subject-container-hash) |
| 1239 | (let ((results ())) | 1271 | (let ((results ())) |
| 1240 | (dolist (root roots) | 1272 | (dolist (root roots) |
| @@ -1251,9 +1283,9 @@ preference to something that has it." | |||
| 1251 | 1283 | ||
| 1252 | (defun mh-thread-process-in-reply-to (reply-to-header) | 1284 | (defun mh-thread-process-in-reply-to (reply-to-header) |
| 1253 | "Extract message id's from REPLY-TO-HEADER. | 1285 | "Extract message id's from REPLY-TO-HEADER. |
| 1254 | Ideally this should have some regexp which will try to guess if a string | 1286 | Ideally this should have some regexp which will try to guess if a |
| 1255 | between < and > is a message id and not an email address. For now it will | 1287 | string between < and > is a message id and not an email address. |
| 1256 | take the last string inside angles." | 1288 | For now it will take the last string inside angles." |
| 1257 | (let ((end (mh-search-from-end ?> reply-to-header))) | 1289 | (let ((end (mh-search-from-end ?> reply-to-header))) |
| 1258 | (when (numberp end) | 1290 | (when (numberp end) |
| 1259 | (let ((begin (mh-search-from-end ?< (substring reply-to-header 0 end)))) | 1291 | (let ((begin (mh-search-from-end ?< (substring reply-to-header 0 end)))) |
| @@ -1279,9 +1311,9 @@ take the last string inside angles." | |||
| 1279 | 1311 | ||
| 1280 | (defsubst mh-thread-update-id-index-maps (id index) | 1312 | (defsubst mh-thread-update-id-index-maps (id index) |
| 1281 | "Message with id, ID is the message in INDEX. | 1313 | "Message with id, ID is the message in INDEX. |
| 1282 | The function also checks for duplicate messages (that is multiple messages | 1314 | The function also checks for duplicate messages (that is multiple |
| 1283 | with the same ID). These messages are put in the `mh-thread-duplicates' hash | 1315 | messages with the same ID). These messages are put in the |
| 1284 | table." | 1316 | `mh-thread-duplicates' hash table." |
| 1285 | (let ((old-index (gethash id mh-thread-id-index-map))) | 1317 | (let ((old-index (gethash id mh-thread-id-index-map))) |
| 1286 | (when old-index (push old-index (gethash id mh-thread-duplicates))) | 1318 | (when old-index (push old-index (gethash id mh-thread-duplicates))) |
| 1287 | (setf (gethash id mh-thread-id-index-map) index) | 1319 | (setf (gethash id mh-thread-id-index-map) index) |
| @@ -1383,9 +1415,9 @@ All messages after START-POINT are added to the thread tree." | |||
| 1383 | 1415 | ||
| 1384 | (defun mh-thread-generate-scan-lines (tree level) | 1416 | (defun mh-thread-generate-scan-lines (tree level) |
| 1385 | "Generate scan lines. | 1417 | "Generate scan lines. |
| 1386 | TREE is the hierarchical tree of messages, SCAN-LINE-MAP maps message indices | 1418 | TREE is the hierarchical tree of messages, SCAN-LINE-MAP maps |
| 1387 | to the corresponding scan lines and LEVEL used to determine indentation of | 1419 | message indices to the corresponding scan lines and LEVEL used to |
| 1388 | the message." | 1420 | determine indentation of the message." |
| 1389 | (cond ((null tree) nil) | 1421 | (cond ((null tree) nil) |
| 1390 | ((mh-thread-container-p tree) | 1422 | ((mh-thread-container-p tree) |
| 1391 | (let* ((message (mh-container-message tree)) | 1423 | (let* ((message (mh-container-message tree)) |
| @@ -1436,8 +1468,9 @@ the message." | |||
| 1436 | ;; the scan which generates the threading info. For now this will have to do. | 1468 | ;; the scan which generates the threading info. For now this will have to do. |
| 1437 | (defun mh-thread-parse-scan-line (&optional string) | 1469 | (defun mh-thread-parse-scan-line (&optional string) |
| 1438 | "Parse a scan line. | 1470 | "Parse a scan line. |
| 1439 | If optional argument STRING is given then that is assumed to be the scan line. | 1471 | If optional argument STRING is given then that is assumed to be |
| 1440 | Otherwise uses the line at point as the scan line to parse." | 1472 | the scan line. Otherwise uses the line at point as the scan line |
| 1473 | to parse." | ||
| 1441 | (let* ((string (or string | 1474 | (let* ((string (or string |
| 1442 | (buffer-substring-no-properties (line-beginning-position) | 1475 | (buffer-substring-no-properties (line-beginning-position) |
| 1443 | (line-end-position)))) | 1476 | (line-end-position)))) |
| @@ -1583,7 +1616,8 @@ MSG is the message being notated with NOTATION at OFFSET." | |||
| 1583 | (defun mh-thread-next-sibling (&optional previous-flag) | 1616 | (defun mh-thread-next-sibling (&optional previous-flag) |
| 1584 | "Display next sibling. | 1617 | "Display next sibling. |
| 1585 | 1618 | ||
| 1586 | With non-nil optional argument PREVIOUS-FLAG jump to the previous sibling." | 1619 | With non-nil optional argument PREVIOUS-FLAG jump to the previous |
| 1620 | sibling." | ||
| 1587 | (interactive) | 1621 | (interactive) |
| 1588 | (cond ((not (memq 'unthread mh-view-ops)) | 1622 | (cond ((not (memq 'unthread mh-view-ops)) |
| 1589 | (error "Folder isn't threaded")) | 1623 | (error "Folder isn't threaded")) |
| @@ -1632,9 +1666,10 @@ With non-nil optional argument PREVIOUS-FLAG jump to the previous sibling." | |||
| 1632 | (defun mh-thread-ancestor (&optional thread-root-flag) | 1666 | (defun mh-thread-ancestor (&optional thread-root-flag) |
| 1633 | "Display ancestor of current message. | 1667 | "Display ancestor of current message. |
| 1634 | 1668 | ||
| 1635 | If you do not care for the way a particular thread has turned, you can move up | 1669 | If you do not care for the way a particular thread has turned, |
| 1636 | the chain of messages with this command. This command can also take a prefix | 1670 | you can move up the chain of messages with this command. This |
| 1637 | argument THREAD-ROOT-FLAG to jump to the message that started everything." | 1671 | command can also take a prefix argument THREAD-ROOT-FLAG to jump |
| 1672 | to the message that started everything." | ||
| 1638 | (interactive "P") | 1673 | (interactive "P") |
| 1639 | (beginning-of-line) | 1674 | (beginning-of-line) |
| 1640 | (cond ((not (memq 'unthread mh-view-ops)) | 1675 | (cond ((not (memq 'unthread mh-view-ops)) |
| @@ -1652,8 +1687,9 @@ argument THREAD-ROOT-FLAG to jump to the message that started everything." | |||
| 1652 | 1687 | ||
| 1653 | (defun mh-thread-find-children () | 1688 | (defun mh-thread-find-children () |
| 1654 | "Return a region containing the current message and its children. | 1689 | "Return a region containing the current message and its children. |
| 1655 | The result is returned as a list of two elements. The first is the point at the | 1690 | The result is returned as a list of two elements. The first is |
| 1656 | start of the region and the second is the point at the end." | 1691 | the point at the start of the region and the second is the point |
| 1692 | at the end." | ||
| 1657 | (beginning-of-line) | 1693 | (beginning-of-line) |
| 1658 | (if (eobp) | 1694 | (if (eobp) |
| 1659 | nil | 1695 | nil |
| @@ -1744,10 +1780,11 @@ interactive use." | |||
| 1744 | (defun mh-narrow-to-tick () | 1780 | (defun mh-narrow-to-tick () |
| 1745 | "Limit to ticked messages. | 1781 | "Limit to ticked messages. |
| 1746 | 1782 | ||
| 1747 | What this command does is show only those messages that are in the \"tick\" | 1783 | What this command does is show only those messages that are in |
| 1748 | sequence (which you can customize via the `mh-tick-seq' option) in the | 1784 | the \"tick\" sequence (which you can customize via the |
| 1749 | MH-Folder buffer. In addition, it limits further MH-E searches to just those | 1785 | `mh-tick-seq' option) in the MH-Folder buffer. In addition, it |
| 1750 | messages. When you want to widen the view to all your messages again, use | 1786 | limits further MH-E searches to just those messages. When you |
| 1787 | want to widen the view to all your messages again, use | ||
| 1751 | \\[mh-widen]." | 1788 | \\[mh-widen]." |
| 1752 | (interactive) | 1789 | (interactive) |
| 1753 | (cond ((not mh-tick-seq) | 1790 | (cond ((not mh-tick-seq) |
diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el index 64aa84fa8d8..5c7f5cda3ba 100644 --- a/lisp/mh-e/mh-speed.el +++ b/lisp/mh-e/mh-speed.el | |||
| @@ -62,7 +62,8 @@ | |||
| 62 | ;;;###mh-autoload | 62 | ;;;###mh-autoload |
| 63 | (defun mh-folder-speedbar-buttons (buffer) | 63 | (defun mh-folder-speedbar-buttons (buffer) |
| 64 | "Interface function to create MH-E speedbar buffer. | 64 | "Interface function to create MH-E speedbar buffer. |
| 65 | BUFFER is the MH-E buffer for which the speedbar buffer is to be created." | 65 | BUFFER is the MH-E buffer for which the speedbar buffer is to be |
| 66 | created." | ||
| 66 | (unless (get-text-property (point-min) 'mh-level) | 67 | (unless (get-text-property (point-min) 'mh-level) |
| 67 | (erase-buffer) | 68 | (erase-buffer) |
| 68 | (clrhash mh-speed-folder-map) | 69 | (clrhash mh-speed-folder-map) |
| @@ -125,11 +126,13 @@ BUFFER is the MH-E buffer for which the speedbar buffer is to be created." | |||
| 125 | 126 | ||
| 126 | (defun mh-speed-update-current-folder (force) | 127 | (defun mh-speed-update-current-folder (force) |
| 127 | "Update speedbar highlighting of the current folder. | 128 | "Update speedbar highlighting of the current folder. |
| 128 | The function tries to be smart so that work done is minimized. The currently | 129 | The function tries to be smart so that work done is minimized. |
| 129 | highlighted folder is cached and no highlighting happens unless it changes. | 130 | The currently highlighted folder is cached and no highlighting |
| 131 | happens unless it changes. | ||
| 130 | Also highlighting is suspended while the speedbar frame is selected. | 132 | Also highlighting is suspended while the speedbar frame is selected. |
| 131 | Otherwise you get the disconcerting behavior of folders popping open on their | 133 | Otherwise you get the disconcerting behavior of folders popping open |
| 132 | own when you are trying to navigate around in the speedbar buffer. | 134 | on their own when you are trying to navigate around in the speedbar |
| 135 | buffer. | ||
| 133 | 136 | ||
| 134 | The update is always carried out if FORCE is non-nil." | 137 | The update is always carried out if FORCE is non-nil." |
| 135 | (let* ((lastf (selected-frame)) | 138 | (let* ((lastf (selected-frame)) |
| @@ -237,7 +240,8 @@ The function will expand out parent folders of FOLDER if needed." | |||
| 237 | 240 | ||
| 238 | (defun mh-speed-extract-folder-name (buffer) | 241 | (defun mh-speed-extract-folder-name (buffer) |
| 239 | "Given an MH-E BUFFER find the folder that should be highlighted. | 242 | "Given an MH-E BUFFER find the folder that should be highlighted. |
| 240 | Do the right thing for the different kinds of buffers that MH-E uses." | 243 | Do the right thing for the different kinds of buffers that MH-E |
| 244 | uses." | ||
| 241 | (save-excursion | 245 | (save-excursion |
| 242 | (set-buffer buffer) | 246 | (set-buffer buffer) |
| 243 | (cond ((eq major-mode 'mh-folder-mode) | 247 | (cond ((eq major-mode 'mh-folder-mode) |
| @@ -353,8 +357,8 @@ The optional ARGS from speedbar are ignored." | |||
| 353 | 357 | ||
| 354 | (defmacro mh-process-kill-without-query (process) | 358 | (defmacro mh-process-kill-without-query (process) |
| 355 | "PROCESS can be killed without query on Emacs exit. | 359 | "PROCESS can be killed without query on Emacs exit. |
| 356 | Avoid using `process-kill-without-query' if possible since it is now | 360 | Avoid using `process-kill-without-query' if possible since it is |
| 357 | obsolete." | 361 | now obsolete." |
| 358 | (if (fboundp 'set-process-query-on-exit-flag) | 362 | (if (fboundp 'set-process-query-on-exit-flag) |
| 359 | `(set-process-query-on-exit-flag ,process nil) | 363 | `(set-process-query-on-exit-flag ,process nil) |
| 360 | `(process-kill-without-query ,process))) | 364 | `(process-kill-without-query ,process))) |
| @@ -364,8 +368,8 @@ obsolete." | |||
| 364 | "Execute flists -recurse and update message counts. | 368 | "Execute flists -recurse and update message counts. |
| 365 | If FORCE is non-nil the timer is reset. | 369 | If FORCE is non-nil the timer is reset. |
| 366 | 370 | ||
| 367 | Any number of optional FOLDERS can be specified. If specified, flists is run | 371 | Any number of optional FOLDERS can be specified. If specified, |
| 368 | only for that one folder." | 372 | flists is run only for that one folder." |
| 369 | (interactive (list t)) | 373 | (interactive (list t)) |
| 370 | (when force | 374 | (when force |
| 371 | (when mh-speed-flists-timer | 375 | (when mh-speed-flists-timer |
| @@ -412,8 +416,8 @@ only for that one folder." | |||
| 412 | ;; Copied from mh-make-folder-list-filter... | 416 | ;; Copied from mh-make-folder-list-filter... |
| 413 | (defun mh-speed-parse-flists-output (process output) | 417 | (defun mh-speed-parse-flists-output (process output) |
| 414 | "Parse the incremental results from flists. | 418 | "Parse the incremental results from flists. |
| 415 | PROCESS is the flists process and OUTPUT is the results that must be handled | 419 | PROCESS is the flists process and OUTPUT is the results that must |
| 416 | next." | 420 | be handled next." |
| 417 | (let ((prevailing-match-data (match-data)) | 421 | (let ((prevailing-match-data (match-data)) |
| 418 | (position 0) | 422 | (position 0) |
| 419 | line-end line folder unseen total) | 423 | line-end line folder unseen total) |
| @@ -506,8 +510,9 @@ next." | |||
| 506 | (defun mh-speed-refresh () | 510 | (defun mh-speed-refresh () |
| 507 | "Regenerates the list of folders in the speedbar. | 511 | "Regenerates the list of folders in the speedbar. |
| 508 | 512 | ||
| 509 | Run this command if you've added or deleted a folder, or want to update the | 513 | Run this command if you've added or deleted a folder, or want to |
| 510 | unseen message count before the next automatic update." | 514 | update the unseen message count before the next automatic |
| 515 | update." | ||
| 511 | (interactive) | 516 | (interactive) |
| 512 | (mh-speed-flists t) | 517 | (mh-speed-flists t) |
| 513 | (mh-speed-invalidate-map "")) | 518 | (mh-speed-invalidate-map "")) |
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index 65e1f2ac9a1..6834f0d6d4b 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el | |||
| @@ -79,8 +79,8 @@ | |||
| 79 | 79 | ||
| 80 | (defun mh-search-from-end (char string) | 80 | (defun mh-search-from-end (char string) |
| 81 | "Return the position of last occurrence of CHAR in STRING. | 81 | "Return the position of last occurrence of CHAR in STRING. |
| 82 | If CHAR is not present in STRING then return nil. The function is used in lieu | 82 | If CHAR is not present in STRING then return nil. The function is |
| 83 | of `search' in the CL package." | 83 | used in lieu of `search' in the CL package." |
| 84 | (loop for index from (1- (length string)) downto 0 | 84 | (loop for index from (1- (length string)) downto 0 |
| 85 | when (equal (aref string index) char) return index | 85 | when (equal (aref string index) char) return index |
| 86 | finally return nil)) | 86 | finally return nil)) |
| @@ -94,59 +94,73 @@ of `search' in the CL package." | |||
| 94 | 94 | ||
| 95 | (defvar mh-scan-msg-number-regexp "^ *\\([0-9]+\\)" | 95 | (defvar mh-scan-msg-number-regexp "^ *\\([0-9]+\\)" |
| 96 | "This regular expression extracts the message number. | 96 | "This regular expression extracts the message number. |
| 97 | It must match from the beginning of the line. Note that the message number | 97 | |
| 98 | must be placed in a parenthesized expression as in the default of | 98 | It must match from the beginning of the line. Note that the |
| 99 | \"^ *\\\\([0-9]+\\\\)\".") | 99 | message number must be placed in a parenthesized expression as in |
| 100 | the default of \"^ *\\\\([0-9]+\\\\)\".") | ||
| 100 | 101 | ||
| 101 | (defvar mh-scan-msg-overflow-regexp "^[?0-9][0-9]" | 102 | (defvar mh-scan-msg-overflow-regexp "^[?0-9][0-9]" |
| 102 | "This regular expression matches overflowed message numbers.") | 103 | "This regular expression matches overflowed message numbers.") |
| 103 | 104 | ||
| 104 | (defvar mh-scan-msg-format-regexp "%\\([0-9]*\\)(msg)" | 105 | (defvar mh-scan-msg-format-regexp "%\\([0-9]*\\)(msg)" |
| 105 | "This regular expression finds the message number width in a scan format. | 106 | "This regular expression finds the message number width in a scan format. |
| 106 | Note that the message number must be placed in a parenthesized expression as | 107 | |
| 107 | in the default of \"%\\\\([0-9]*\\\\)(msg)\". This variable is only consulted | 108 | Note that the message number must be placed in a parenthesized |
| 108 | if `mh-scan-format-file' is set to \"Use MH-E scan Format\".") | 109 | expression as in the default of \"%\\\\([0-9]*\\\\)(msg)\". This |
| 110 | variable is only consulted if `mh-scan-format-file' is set to | ||
| 111 | \"Use MH-E scan Format\".") | ||
| 109 | 112 | ||
| 110 | (defvar mh-scan-msg-format-string "%d" | 113 | (defvar mh-scan-msg-format-string "%d" |
| 111 | "This is a format string for width of the message number in a scan format. | 114 | "This is a format string for width of the message number in a scan format. |
| 112 | Use `0%d' for zero-filled message numbers. This variable is only consulted if | 115 | |
| 113 | `mh-scan-format-file' is set to \"Use MH-E scan Format\".") | 116 | Use `0%d' for zero-filled message numbers. This variable is only |
| 117 | consulted if `mh-scan-format-file' is set to \"Use MH-E scan | ||
| 118 | Format\".") | ||
| 114 | 119 | ||
| 115 | (defvar mh-scan-msg-search-regexp "^[^0-9]*%d[^0-9]" | 120 | (defvar mh-scan-msg-search-regexp "^[^0-9]*%d[^0-9]" |
| 116 | "This regular expression matches a particular message. | 121 | "This regular expression matches a particular message. |
| 117 | It is a format string; use `%d' to represent the location of the message | 122 | |
| 118 | number within the expression as in the default of \"^[^0-9]*%d[^0-9]\".") | 123 | It is a format string; use `%d' to represent the location of the |
| 124 | message number within the expression as in the default of | ||
| 125 | \"^[^0-9]*%d[^0-9]\".") | ||
| 119 | 126 | ||
| 120 | (defvar mh-cmd-note 4 | 127 | (defvar mh-cmd-note 4 |
| 121 | "Column for notations. | 128 | "Column for notations. |
| 122 | This variable should be set with the function `mh-set-cmd-note'. This variable | 129 | |
| 123 | may be updated dynamically if `mh-adaptive-cmd-note-flag' is on. | 130 | This variable should be set with the function `mh-set-cmd-note'. |
| 131 | This variable may be updated dynamically if | ||
| 132 | `mh-adaptive-cmd-note-flag' is on. | ||
| 124 | 133 | ||
| 125 | Note that columns in Emacs start with 0.") | 134 | Note that columns in Emacs start with 0.") |
| 126 | (make-variable-buffer-local 'mh-cmd-note) | 135 | (make-variable-buffer-local 'mh-cmd-note) |
| 127 | 136 | ||
| 128 | (defvar mh-note-seq ?% | 137 | (defvar mh-note-seq ?% |
| 129 | "Messages in a user-defined sequence are marked by this character. | 138 | "Messages in a user-defined sequence are marked by this character. |
| 130 | Messages in the `search' sequence are marked by this character as well.") | 139 | |
| 140 | Messages in the `search' sequence are marked by this character as | ||
| 141 | well.") | ||
| 131 | 142 | ||
| 132 | 143 | ||
| 133 | 144 | ||
| 134 | (defvar mh-show-buffer-mode-line-buffer-id " {show-%s} %d" | 145 | (defvar mh-show-buffer-mode-line-buffer-id " {show-%s} %d" |
| 135 | "Format string to produce `mode-line-buffer-identification' for show buffers. | 146 | "Format string to produce `mode-line-buffer-identification' for show buffers. |
| 136 | First argument is folder name. Second is message number.") | 147 | |
| 148 | First argument is folder name. Second is message number.") | ||
| 137 | 149 | ||
| 138 | 150 | ||
| 139 | 151 | ||
| 140 | (defvar mh-mail-header-separator "--------" | 152 | (defvar mh-mail-header-separator "--------" |
| 141 | "*Line used by MH to separate headers from text in messages being composed. | 153 | "*Line used by MH to separate headers from text in messages being composed. |
| 142 | This variable should not be used directly in programs. Programs should use | ||
| 143 | `mail-header-separator' instead. `mail-header-separator' is initialized to | ||
| 144 | `mh-mail-header-separator' in `mh-letter-mode'; in other contexts, you may | ||
| 145 | have to perform this initialization yourself. | ||
| 146 | 154 | ||
| 147 | Do not make this a regular expression as it may be the argument to `insert' | 155 | This variable should not be used directly in programs. Programs |
| 148 | and it is passed through `regexp-quote' before being used by functions like | 156 | should use `mail-header-separator' instead. |
| 149 | `re-search-forward'.") | 157 | `mail-header-separator' is initialized to |
| 158 | `mh-mail-header-separator' in `mh-letter-mode'; in other | ||
| 159 | contexts, you may have to perform this initialization yourself. | ||
| 160 | |||
| 161 | Do not make this a regular expression as it may be the argument | ||
| 162 | to `insert' and it is passed through `regexp-quote' before being | ||
| 163 | used by functions like `re-search-forward'.") | ||
| 150 | 164 | ||
| 151 | (defvar mh-signature-separator-regexp "^-- $" | 165 | (defvar mh-signature-separator-regexp "^-- $" |
| 152 | "This regular expression matches the signature separator. | 166 | "This regular expression matches the signature separator. |
| @@ -154,11 +168,12 @@ See `mh-signature-separator'.") | |||
| 154 | 168 | ||
| 155 | (defvar mh-signature-separator "-- \n" | 169 | (defvar mh-signature-separator "-- \n" |
| 156 | "Text of a signature separator. | 170 | "Text of a signature separator. |
| 157 | A signature separator is used to separate the body of a message from the | 171 | |
| 158 | signature. This can be used by user agents such as MH-E to render the | 172 | A signature separator is used to separate the body of a message |
| 159 | signature differently or to suppress the inclusion of the signature in a | 173 | from the signature. This can be used by user agents such as MH-E |
| 160 | reply. | 174 | to render the signature differently or to suppress the inclusion |
| 161 | Use `mh-signature-separator-regexp' when searching for a separator.") | 175 | of the signature in a reply. Use `mh-signature-separator-regexp' |
| 176 | when searching for a separator.") | ||
| 162 | 177 | ||
| 163 | (defun mh-signature-separator-p () | 178 | (defun mh-signature-separator-p () |
| 164 | "Return non-nil if buffer includes \"^-- $\"." | 179 | "Return non-nil if buffer includes \"^-- $\"." |
| @@ -288,8 +303,9 @@ Use `mh-signature-separator-regexp' when searching for a separator.") | |||
| 288 | 303 | ||
| 289 | (defun mh-goto-address-find-address-at-point () | 304 | (defun mh-goto-address-find-address-at-point () |
| 290 | "Find e-mail address around or before point. | 305 | "Find e-mail address around or before point. |
| 291 | Then search backwards to beginning of line for the start of an e-mail | 306 | |
| 292 | address. If no e-mail address found, return nil." | 307 | Then search backwards to beginning of line for the start of an |
| 308 | e-mail address. If no e-mail address found, return nil." | ||
| 293 | (re-search-backward "[^-_A-z0-9.@]" (line-beginning-position) 'lim) | 309 | (re-search-backward "[^-_A-z0-9.@]" (line-beginning-position) 'lim) |
| 294 | (if (or (looking-at mh-address-mail-regexp) ; already at start | 310 | (if (or (looking-at mh-address-mail-regexp) ; already at start |
| 295 | (and (re-search-forward mh-address-mail-regexp | 311 | (and (re-search-forward mh-address-mail-regexp |
| @@ -299,8 +315,10 @@ address. If no e-mail address found, return nil." | |||
| 299 | 315 | ||
| 300 | (defun mh-mail-header-end () | 316 | (defun mh-mail-header-end () |
| 301 | "Substitute for `mail-header-end' that doesn't widen the buffer. | 317 | "Substitute for `mail-header-end' that doesn't widen the buffer. |
| 302 | In MH-E we frequently need to find the end of headers in nested messages, where | 318 | |
| 303 | the buffer has been narrowed. This function works in this situation." | 319 | In MH-E we frequently need to find the end of headers in nested |
| 320 | messages, where the buffer has been narrowed. This function works | ||
| 321 | in this situation." | ||
| 304 | (save-excursion | 322 | (save-excursion |
| 305 | ;; XXX: The following replaces a call to rfc822-goto-eoh. Occasionally, | 323 | ;; XXX: The following replaces a call to rfc822-goto-eoh. Occasionally, |
| 306 | ;; mail headers that MH-E has to read contains lines of the form: | 324 | ;; mail headers that MH-E has to read contains lines of the form: |
| @@ -423,10 +441,11 @@ Argument LIMIT limits search." | |||
| 423 | (defun mh-show-font-lock-fontify-region (beg end loudly) | 441 | (defun mh-show-font-lock-fontify-region (beg end loudly) |
| 424 | "Limit font-lock in `mh-show-mode' to the header. | 442 | "Limit font-lock in `mh-show-mode' to the header. |
| 425 | 443 | ||
| 426 | Used when the option `mh-highlight-citation-style' is set to \"Gnus\", leaving | 444 | Used when the option `mh-highlight-citation-style' is set to |
| 427 | the body to be dealt with by Gnus highlighting. The region between BEG and END | 445 | \"Gnus\", leaving the body to be dealt with by Gnus highlighting. |
| 428 | is given over to be fontified and LOUDLY controls if a user sees a message | 446 | The region between BEG and END is given over to be fontified and |
| 429 | about the fontification operation." | 447 | LOUDLY controls if a user sees a message about the fontification |
| 448 | operation." | ||
| 430 | (let ((header-end (mh-mail-header-end))) | 449 | (let ((header-end (mh-mail-header-end))) |
| 431 | (cond | 450 | (cond |
| 432 | ((and (< beg header-end)(< end header-end)) | 451 | ((and (< beg header-end)(< end header-end)) |
| @@ -469,28 +488,27 @@ about the fontification operation." | |||
| 469 | 488 | ||
| 470 | ;;; Internal bookkeeping variables: | 489 | ;;; Internal bookkeeping variables: |
| 471 | 490 | ||
| 472 | ;; Cached value of the `Path:' component in the user's MH profile. | 491 | (defvar mh-user-path nil |
| 473 | ;; User's mail folder directory. | 492 | "Cached value of the \"Path:\" MH profile component. |
| 474 | (defvar mh-user-path nil) | 493 | User's mail folder directory.") |
| 475 | 494 | ||
| 476 | ;; An mh-draft-folder of nil means do not use a draft folder. | 495 | (defvar mh-draft-folder nil |
| 477 | ;; Cached value of the `Draft-Folder:' component in the user's MH profile. | 496 | "Cached value of the \"Draft-Folder:\" MH profile component. |
| 478 | ;; Name of folder containing draft messages. | 497 | Name of folder containing draft messages. |
| 479 | (defvar mh-draft-folder nil) | 498 | Nil means do not use a draft folder.") |
| 480 | 499 | ||
| 481 | ;; Cached value of the `Unseen-Sequence:' component in the user's MH profile. | 500 | (defvar mh-unseen-seq nil |
| 482 | ;; Name of the Unseen sequence. | 501 | "Cached value of the \"Unseen-Sequence:\" MH profile component. |
| 483 | (defvar mh-unseen-seq nil) | 502 | Name of the Unseen sequence.") |
| 484 | 503 | ||
| 485 | ;; Cached value of the `Previous-Sequence:' component in the user's MH | 504 | (defvar mh-previous-seq nil |
| 486 | ;; profile. | 505 | "Cached value of the \"Previous-Sequence:\" MH profile component. |
| 487 | ;; Name of the Previous sequence. | 506 | Name of the Previous sequence.") |
| 488 | (defvar mh-previous-seq nil) | ||
| 489 | 507 | ||
| 490 | ;; Cached value of the `Inbox:' component in the user's MH profile, | 508 | (defvar mh-inbox nil |
| 491 | ;; or "+inbox" if no such component. | 509 | "Cached value of the \"Inbox:\" MH profile component. |
| 492 | ;; Name of the Inbox folder. | 510 | Set to \"+inbox\" if no such component. |
| 493 | (defvar mh-inbox nil) | 511 | Name of the Inbox folder.") |
| 494 | 512 | ||
| 495 | ;; The names of ephemeral buffers have a " *mh-" prefix (so that they are | 513 | ;; The names of ephemeral buffers have a " *mh-" prefix (so that they are |
| 496 | ;; hidden and can be programmatically removed in mh-quit), and the variable | 514 | ;; hidden and can be programmatically removed in mh-quit), and the variable |
| @@ -511,33 +529,33 @@ about the fontification operation." | |||
| 511 | (defconst mh-recipients-buffer "*MH-E Recipients*") ;killed when draft sent | 529 | (defconst mh-recipients-buffer "*MH-E Recipients*") ;killed when draft sent |
| 512 | (defconst mh-sequences-buffer "*MH-E Sequences*") ;sequences list | 530 | (defconst mh-sequences-buffer "*MH-E Sequences*") ;sequences list |
| 513 | 531 | ||
| 514 | ;; Number of lines to keep in mh-log-buffer. | 532 | (defvar mh-log-buffer-lines 100 |
| 515 | (defvar mh-log-buffer-lines 100) | 533 | "Number of lines to keep in `mh-log-buffer'.") |
| 516 | 534 | ||
| 517 | ;; Window configuration before MH-E command. | 535 | (defvar mh-previous-window-config nil |
| 518 | (defvar mh-previous-window-config nil) | 536 | "Window configuration before MH-E command.") |
| 519 | 537 | ||
| 520 | ;;Non-nil means next SPC or whatever goes to next undeleted message. | 538 | (defvar mh-page-to-next-msg-flag nil |
| 521 | (defvar mh-page-to-next-msg-flag nil) | 539 | "Non-nil means next SPC or whatever goes to next undeleted message.") |
| 522 | 540 | ||
| 523 | 541 | ||
| 524 | 542 | ||
| 525 | ;;; Internal variables local to a folder. | 543 | ;;; Internal variables local to a folder. |
| 526 | 544 | ||
| 527 | ;; Name of current folder, a string. | 545 | (defvar mh-current-folder nil |
| 528 | (defvar mh-current-folder nil) | 546 | "Name of current folder, a string.") |
| 529 | 547 | ||
| 530 | ;; Buffer that displays message for this folder. | 548 | (defvar mh-show-buffer nil |
| 531 | (defvar mh-show-buffer nil) | 549 | "Buffer that displays message for this folder.") |
| 532 | 550 | ||
| 533 | ;; Full path of directory for this folder. | 551 | (defvar mh-folder-filename nil |
| 534 | (defvar mh-folder-filename nil) | 552 | "Full path of directory for this folder.") |
| 535 | 553 | ||
| 536 | ;;Number of msgs in buffer. | 554 | (defvar mh-msg-count nil |
| 537 | (defvar mh-msg-count nil) | 555 | "Number of msgs in buffer.") |
| 538 | 556 | ||
| 539 | ;; If non-nil, show the message in a separate window. | 557 | (defvar mh-showing-mode nil |
| 540 | (defvar mh-showing-mode nil) | 558 | "If non-nil, show the message in a separate window.") |
| 541 | 559 | ||
| 542 | (defvar mh-show-mode-map (make-sparse-keymap) | 560 | (defvar mh-show-mode-map (make-sparse-keymap) |
| 543 | "Keymap used by the show buffer.") | 561 | "Keymap used by the show buffer.") |
| @@ -594,8 +612,8 @@ If nil, MH-Show buffer contains message processed normally.") | |||
| 594 | "Format is (with-mh-folder-updating (SAVE-MODIFICATION-FLAG) &body BODY). | 612 | "Format is (with-mh-folder-updating (SAVE-MODIFICATION-FLAG) &body BODY). |
| 595 | Execute BODY, which can modify the folder buffer without having to | 613 | Execute BODY, which can modify the folder buffer without having to |
| 596 | worry about file locking or the read-only flag, and return its result. | 614 | worry about file locking or the read-only flag, and return its result. |
| 597 | If SAVE-MODIFICATION-FLAG is non-nil, the buffer's modification | 615 | If SAVE-MODIFICATION-FLAG is non-nil, the buffer's modification flag |
| 598 | flag is unchanged, otherwise it is cleared." | 616 | is unchanged, otherwise it is cleared." |
| 599 | (setq save-modification-flag (car save-modification-flag)) ; CL style | 617 | (setq save-modification-flag (car save-modification-flag)) ; CL style |
| 600 | `(prog1 | 618 | `(prog1 |
| 601 | (let ((mh-folder-updating-mod-flag (buffer-modified-p)) | 619 | (let ((mh-folder-updating-mod-flag (buffer-modified-p)) |
| @@ -627,8 +645,9 @@ Stronger than `save-excursion', weaker than `save-window-excursion'." | |||
| 627 | 645 | ||
| 628 | (defmacro mh-do-at-event-location (event &rest body) | 646 | (defmacro mh-do-at-event-location (event &rest body) |
| 629 | "Switch to the location of EVENT and execute BODY. | 647 | "Switch to the location of EVENT and execute BODY. |
| 630 | After BODY has been executed return to original window. The modification flag | 648 | After BODY has been executed return to original window. The |
| 631 | of the buffer in the event window is preserved." | 649 | modification flag of the buffer in the event window is |
| 650 | preserved." | ||
| 632 | (let ((event-window (make-symbol "event-window")) | 651 | (let ((event-window (make-symbol "event-window")) |
| 633 | (event-position (make-symbol "event-position")) | 652 | (event-position (make-symbol "event-position")) |
| 634 | (original-window (make-symbol "original-window")) | 653 | (original-window (make-symbol "original-window")) |
| @@ -672,9 +691,12 @@ of the buffer in the event window is preserved." | |||
| 672 | 691 | ||
| 673 | (defun mh-recenter (arg) | 692 | (defun mh-recenter (arg) |
| 674 | "Like recenter but with three improvements: | 693 | "Like recenter but with three improvements: |
| 694 | |||
| 675 | - At the end of the buffer it tries to show fewer empty lines. | 695 | - At the end of the buffer it tries to show fewer empty lines. |
| 696 | |||
| 676 | - operates only if the current buffer is in the selected window. | 697 | - operates only if the current buffer is in the selected window. |
| 677 | (Commands like `save-some-buffers' can make this false.) | 698 | (Commands like `save-some-buffers' can make this false.) |
| 699 | |||
| 678 | - nil ARG means recenter as if prefix argument had been given." | 700 | - nil ARG means recenter as if prefix argument had been given." |
| 679 | (cond ((not (eq (get-buffer-window (current-buffer)) (selected-window))) | 701 | (cond ((not (eq (get-buffer-window (current-buffer)) (selected-window))) |
| 680 | nil) | 702 | nil) |
| @@ -718,8 +740,8 @@ of the buffer in the event window is preserved." | |||
| 718 | 740 | ||
| 719 | (defun mh-get-msg-num (error-if-no-message) | 741 | (defun mh-get-msg-num (error-if-no-message) |
| 720 | "Return the message number of the displayed message. | 742 | "Return the message number of the displayed message. |
| 721 | If the argument ERROR-IF-NO-MESSAGE is non-nil, then complain if the cursor is | 743 | If the argument ERROR-IF-NO-MESSAGE is non-nil, then complain if |
| 722 | not pointing to a message." | 744 | the cursor is not pointing to a message." |
| 723 | (save-excursion | 745 | (save-excursion |
| 724 | (beginning-of-line) | 746 | (beginning-of-line) |
| 725 | (cond ((looking-at mh-scan-msg-number-regexp) | 747 | (cond ((looking-at mh-scan-msg-number-regexp) |
| @@ -731,7 +753,8 @@ not pointing to a message." | |||
| 731 | 753 | ||
| 732 | (defun mh-folder-name-p (name) | 754 | (defun mh-folder-name-p (name) |
| 733 | "Return non-nil if NAME is the name of a folder. | 755 | "Return non-nil if NAME is the name of a folder. |
| 734 | A name (a string or symbol) can be a folder name if it begins with \"+\"." | 756 | A name (a string or symbol) can be a folder name if it begins |
| 757 | with \"+\"." | ||
| 735 | (if (symbolp name) | 758 | (if (symbolp name) |
| 736 | (eq (aref (symbol-name name) 0) ?+) | 759 | (eq (aref (symbol-name name) 0) ?+) |
| 737 | (and (> (length name) 0) | 760 | (and (> (length name) 0) |
| @@ -761,8 +784,8 @@ See `expand-file-name' for description of DEFAULT." | |||
| 761 | (defmacro mh-defun-show-buffer (function original-function | 784 | (defmacro mh-defun-show-buffer (function original-function |
| 762 | &optional dont-return) | 785 | &optional dont-return) |
| 763 | "Define FUNCTION to run ORIGINAL-FUNCTION in folder buffer. | 786 | "Define FUNCTION to run ORIGINAL-FUNCTION in folder buffer. |
| 764 | If the buffer we start in is still visible and DONT-RETURN is nil then switch | 787 | If the buffer we start in is still visible and DONT-RETURN is nil |
| 765 | to it after that." | 788 | then switch to it after that." |
| 766 | `(defun ,function () | 789 | `(defun ,function () |
| 767 | ,(format "Calls %s from the message's folder.\n%s\nSee `%s' for more info.\n" | 790 | ,(format "Calls %s from the message's folder.\n%s\nSee `%s' for more info.\n" |
| 768 | original-function | 791 | original-function |
| @@ -1208,8 +1231,8 @@ See also `mh-folder-mode'. | |||
| 1208 | 1231 | ||
| 1209 | (defun mh-face-display-function () | 1232 | (defun mh-face-display-function () |
| 1210 | "Display a Face, X-Face, or X-Image-URL header field. | 1233 | "Display a Face, X-Face, or X-Image-URL header field. |
| 1211 | If more than one of these are present, then the first one found in this order | 1234 | If more than one of these are present, then the first one found |
| 1212 | is used." | 1235 | in this order is used." |
| 1213 | (save-restriction | 1236 | (save-restriction |
| 1214 | (goto-char (point-min)) | 1237 | (goto-char (point-min)) |
| 1215 | (re-search-forward "\n\n" (point-max) t) | 1238 | (re-search-forward "\n\n" (point-max) t) |
| @@ -1375,9 +1398,9 @@ The directories are searched for in the order they appear in the list.") | |||
| 1375 | 1398 | ||
| 1376 | (defun mh-picon-file-contents (file) | 1399 | (defun mh-picon-file-contents (file) |
| 1377 | "Return details about FILE. | 1400 | "Return details about FILE. |
| 1378 | A list of consisting of a symbol for the type of the file and the file | 1401 | A list of consisting of a symbol for the type of the file and the |
| 1379 | contents as a string is returned. If FILE is nil, then both elements of the | 1402 | file contents as a string is returned. If FILE is nil, then both |
| 1380 | list are nil." | 1403 | elements of the list are nil." |
| 1381 | (if (stringp file) | 1404 | (if (stringp file) |
| 1382 | (with-temp-buffer | 1405 | (with-temp-buffer |
| 1383 | (let ((type (and (string-match ".*\\.\\(...\\)$" file) | 1406 | (let ((type (and (string-match ".*\\.\\(...\\)$" file) |
| @@ -1388,8 +1411,9 @@ list are nil." | |||
| 1388 | 1411 | ||
| 1389 | (defun mh-picon-generate-path (host-list user directory) | 1412 | (defun mh-picon-generate-path (host-list user directory) |
| 1390 | "Generate the image file path. | 1413 | "Generate the image file path. |
| 1391 | HOST-LIST is the parsed host address of the email address, USER the username | 1414 | HOST-LIST is the parsed host address of the email address, USER |
| 1392 | and DIRECTORY is the directory relative to which the path is generated." | 1415 | the username and DIRECTORY is the directory relative to which the |
| 1416 | path is generated." | ||
| 1393 | (loop with acc = "" | 1417 | (loop with acc = "" |
| 1394 | for elem in host-list | 1418 | for elem in host-list |
| 1395 | do (setq acc (format "%s/%s" elem acc)) | 1419 | do (setq acc (format "%s/%s" elem acc)) |
| @@ -1460,9 +1484,9 @@ Replace the ?/ character with a ?! character and append .png." | |||
| 1460 | 1484 | ||
| 1461 | (defun mh-x-image-url-fetch-image (url cache-file marker sentinel) | 1485 | (defun mh-x-image-url-fetch-image (url cache-file marker sentinel) |
| 1462 | "Fetch and display the image specified by URL. | 1486 | "Fetch and display the image specified by URL. |
| 1463 | After the image is fetched, it is stored in CACHE-FILE. It will be displayed | 1487 | After the image is fetched, it is stored in CACHE-FILE. It will |
| 1464 | in a buffer and position specified by MARKER. The actual display is carried | 1488 | be displayed in a buffer and position specified by MARKER. The |
| 1465 | out by the SENTINEL function." | 1489 | actual display is carried out by the SENTINEL function." |
| 1466 | (if mh-wget-executable | 1490 | (if mh-wget-executable |
| 1467 | (let ((buffer (get-buffer-create (generate-new-buffer-name | 1491 | (let ((buffer (get-buffer-create (generate-new-buffer-name |
| 1468 | mh-temp-fetch-buffer))) | 1492 | mh-temp-fetch-buffer))) |
| @@ -1576,18 +1600,18 @@ If optional arg MSG is non-nil, display that message instead." | |||
| 1576 | (defun mh-show (&optional message redisplay-flag) | 1600 | (defun mh-show (&optional message redisplay-flag) |
| 1577 | "Display message\\<mh-folder-mode-map>. | 1601 | "Display message\\<mh-folder-mode-map>. |
| 1578 | 1602 | ||
| 1579 | If the message under the cursor is already displayed, this command scrolls to | 1603 | If the message under the cursor is already displayed, this command |
| 1580 | the beginning of the message. MH-E normally hides a lot of the superfluous | 1604 | scrolls to the beginning of the message. MH-E normally hides a lot of |
| 1581 | header fields that mailers add to a message, but if you wish to see all of | 1605 | the superfluous header fields that mailers add to a message, but if |
| 1582 | them, use the command \\[mh-header-display]. | 1606 | you wish to see all of them, use the command \\[mh-header-display]. |
| 1583 | 1607 | ||
| 1584 | From a program, optional argument MESSAGE can be used to display an | 1608 | From a program, optional argument MESSAGE can be used to display an |
| 1585 | alternative message. The optional argument REDISPLAY-FLAG forces the redisplay | 1609 | alternative message. The optional argument REDISPLAY-FLAG forces the |
| 1586 | of the message even if the show buffer was already displaying the correct | 1610 | redisplay of the message even if the show buffer was already |
| 1587 | message. | 1611 | displaying the correct message. |
| 1588 | 1612 | ||
| 1589 | See the \"mh-show\" customization group for a litany of options that control | 1613 | See the \"mh-show\" customization group for a litany of options that |
| 1590 | what displayed messages look like." | 1614 | control what displayed messages look like." |
| 1591 | (interactive (list nil t)) | 1615 | (interactive (list nil t)) |
| 1592 | (when (or redisplay-flag | 1616 | (when (or redisplay-flag |
| 1593 | (and mh-showing-with-headers | 1617 | (and mh-showing-with-headers |
| @@ -1656,10 +1680,11 @@ displayed." | |||
| 1656 | (defun mh-modify (&optional message) | 1680 | (defun mh-modify (&optional message) |
| 1657 | "Edit message. | 1681 | "Edit message. |
| 1658 | 1682 | ||
| 1659 | There are times when you need to edit a message. For example, you may need to | 1683 | There are times when you need to edit a message. For example, you |
| 1660 | fix a broken Content-Type header field. You can do this with this command. It | 1684 | may need to fix a broken Content-Type header field. You can do |
| 1661 | displays the raw message in an editable buffer. When you are done editing, | 1685 | this with this command. It displays the raw message in an |
| 1662 | save and kill the buffer as you would any other. | 1686 | editable buffer. When you are done editing, save and kill the |
| 1687 | buffer as you would any other. | ||
| 1663 | 1688 | ||
| 1664 | From a program, edit MESSAGE instead if it is non-nil." | 1689 | From a program, edit MESSAGE instead if it is non-nil." |
| 1665 | (interactive) | 1690 | (interactive) |
| @@ -1793,13 +1818,14 @@ Sets the current buffer to the show buffer." | |||
| 1793 | 1818 | ||
| 1794 | (defun mh-clean-msg-header (start invisible-headers visible-headers) | 1819 | (defun mh-clean-msg-header (start invisible-headers visible-headers) |
| 1795 | "Flush extraneous lines in message header. | 1820 | "Flush extraneous lines in message header. |
| 1796 | Header is cleaned from START to the end of the message header. | ||
| 1797 | INVISIBLE-HEADERS contains a regular expression specifying lines to delete | ||
| 1798 | from the header. VISIBLE-HEADERS contains a regular expression specifying the | ||
| 1799 | lines to display. INVISIBLE-HEADERS is ignored if VISIBLE-HEADERS is non-nil. | ||
| 1800 | 1821 | ||
| 1801 | Note that MH-E no longer supports the `mh-visible-headers' variable, so | 1822 | Header is cleaned from START to the end of the message header. |
| 1802 | this function could be trimmed of this feature too." | 1823 | INVISIBLE-HEADERS contains a regular expression specifying lines |
| 1824 | to delete from the header. VISIBLE-HEADERS contains a regular | ||
| 1825 | expression specifying the lines to display. INVISIBLE-HEADERS is | ||
| 1826 | ignored if VISIBLE-HEADERS is non-nil." | ||
| 1827 | ;; XXX Note that MH-E no longer supports the `mh-visible-headers' | ||
| 1828 | ;; variable, so this function could be trimmed of this feature too." | ||
| 1803 | (let ((case-fold-search t) | 1829 | (let ((case-fold-search t) |
| 1804 | (buffer-read-only nil) | 1830 | (buffer-read-only nil) |
| 1805 | (after-change-functions nil)) ;Work around emacs-20 font-lock bug | 1831 | (after-change-functions nil)) ;Work around emacs-20 font-lock bug |
| @@ -1870,10 +1896,11 @@ If NOTATION is nil then no change in the buffer occurs." | |||
| 1870 | You can enter the message NUMBER either before or after typing | 1896 | You can enter the message NUMBER either before or after typing |
| 1871 | \\[mh-goto-msg]. In the latter case, Emacs prompts you. | 1897 | \\[mh-goto-msg]. In the latter case, Emacs prompts you. |
| 1872 | 1898 | ||
| 1873 | In a program, optional non-nil second argument NO-ERROR-IF-NO-MESSAGE means | 1899 | In a program, optional non-nil second argument NO-ERROR-IF-NO-MESSAGE |
| 1874 | return nil instead of signaling an error if message does not exist\; in this | 1900 | means return nil instead of signaling an error if message does not |
| 1875 | case, the cursor is positioned near where the message would have been. Non-nil | 1901 | exist\; in this case, the cursor is positioned near where the message |
| 1876 | third argument DONT-SHOW means not to show the message." | 1902 | would have been. Non-nil third argument DONT-SHOW means not to show |
| 1903 | the message." | ||
| 1877 | (interactive "NGo to message: ") | 1904 | (interactive "NGo to message: ") |
| 1878 | (setq number (prefix-numeric-value number)) | 1905 | (setq number (prefix-numeric-value number)) |
| 1879 | (let ((point (point)) | 1906 | (let ((point (point)) |
| @@ -1910,12 +1937,14 @@ Returns nil if the field is not in the buffer." | |||
| 1910 | This function sets `mh-user-path' from your \"Path:\" MH profile | 1937 | This function sets `mh-user-path' from your \"Path:\" MH profile |
| 1911 | component (but defaults to \"Mail\" if one isn't present), | 1938 | component (but defaults to \"Mail\" if one isn't present), |
| 1912 | `mh-draft-folder' from \"Draft-Folder:\", `mh-unseen-seq' from | 1939 | `mh-draft-folder' from \"Draft-Folder:\", `mh-unseen-seq' from |
| 1913 | \"Unseen-Sequence:\", `mh-previous-seq' from \"Previous-Sequence:\", | 1940 | \"Unseen-Sequence:\", `mh-previous-seq' from |
| 1914 | and `mh-inbox' from \"Inbox:\" (defaults to \"+inbox\"). | 1941 | \"Previous-Sequence:\", and `mh-inbox' from \"Inbox:\" (defaults |
| 1915 | 1942 | to \"+inbox\"). | |
| 1916 | The hook `mh-find-path-hook' is run after these variables have been | 1943 | |
| 1917 | set. This hook can be used the change the value of these variables if | 1944 | The hook `mh-find-path-hook' is run after these variables have |
| 1918 | you need to run with different values between MH and MH-E." | 1945 | been set. This hook can be used the change the value of these |
| 1946 | variables if you need to run with different values between MH and | ||
| 1947 | MH-E." | ||
| 1919 | (mh-variants) | 1948 | (mh-variants) |
| 1920 | (unless mh-find-path-run | 1949 | (unless mh-find-path-run |
| 1921 | (setq mh-find-path-run t) | 1950 | (setq mh-find-path-run t) |
| @@ -1970,8 +1999,8 @@ you need to run with different values between MH and MH-E." | |||
| 1970 | 1999 | ||
| 1971 | (defun mh-install (profile error-val) | 2000 | (defun mh-install (profile error-val) |
| 1972 | "Initialize the MH environment. | 2001 | "Initialize the MH environment. |
| 1973 | This is called if we fail to read the PROFILE file. ERROR-VAL is the error | 2002 | This is called if we fail to read the PROFILE file. ERROR-VAL is |
| 1974 | that made this call necessary." | 2003 | the error that made this call necessary." |
| 1975 | (if (or (getenv "MH") | 2004 | (if (or (getenv "MH") |
| 1976 | (file-exists-p profile) | 2005 | (file-exists-p profile) |
| 1977 | mh-no-install) | 2006 | mh-no-install) |
| @@ -2007,9 +2036,9 @@ that made this call necessary." | |||
| 2007 | (defun mh-update-scan-format (fmt width) | 2036 | (defun mh-update-scan-format (fmt width) |
| 2008 | "Return a scan format with the (msg) width in the FMT replaced with WIDTH. | 2037 | "Return a scan format with the (msg) width in the FMT replaced with WIDTH. |
| 2009 | 2038 | ||
| 2010 | The message number width portion of the format is discovered using | 2039 | The message number width portion of the format is discovered |
| 2011 | `mh-scan-msg-format-regexp'. Its replacement is controlled with | 2040 | using `mh-scan-msg-format-regexp'. Its replacement is controlled |
| 2012 | `mh-scan-msg-format-string'." | 2041 | with `mh-scan-msg-format-string'." |
| 2013 | (or (and | 2042 | (or (and |
| 2014 | (string-match mh-scan-msg-format-regexp fmt) | 2043 | (string-match mh-scan-msg-format-regexp fmt) |
| 2015 | (let ((begin (match-beginning 1)) | 2044 | (let ((begin (match-beginning 1)) |
| @@ -2038,12 +2067,13 @@ The message number width portion of the format is discovered using | |||
| 2038 | 2067 | ||
| 2039 | (defun mh-add-msgs-to-seq (msgs seq &optional internal-flag dont-annotate-flag) | 2068 | (defun mh-add-msgs-to-seq (msgs seq &optional internal-flag dont-annotate-flag) |
| 2040 | "Add MSGS to SEQ. | 2069 | "Add MSGS to SEQ. |
| 2041 | Remove duplicates and keep sequence sorted. If optional INTERNAL-FLAG is | ||
| 2042 | non-nil, do not mark the message in the scan listing or inform MH of the | ||
| 2043 | addition. | ||
| 2044 | 2070 | ||
| 2045 | If DONT-ANNOTATE-FLAG is non-nil then the annotations in the folder buffer are | 2071 | Remove duplicates and keep sequence sorted. If optional |
| 2046 | not updated." | 2072 | INTERNAL-FLAG is non-nil, do not mark the message in the scan |
| 2073 | listing or inform MH of the addition. | ||
| 2074 | |||
| 2075 | If DONT-ANNOTATE-FLAG is non-nil then the annotations in the | ||
| 2076 | folder buffer are not updated." | ||
| 2047 | (let ((entry (mh-find-seq seq)) | 2077 | (let ((entry (mh-find-seq seq)) |
| 2048 | (internal-seq-flag (mh-internal-seq seq))) | 2078 | (internal-seq-flag (mh-internal-seq seq))) |
| 2049 | (if (and msgs (atom msgs)) (setq msgs (list msgs))) | 2079 | (if (and msgs (atom msgs)) (setq msgs (list msgs))) |
| @@ -2085,8 +2115,8 @@ not updated." | |||
| 2085 | 2115 | ||
| 2086 | (defun mh-collect-folder-names-filter (process output) | 2116 | (defun mh-collect-folder-names-filter (process output) |
| 2087 | "Read folder names. | 2117 | "Read folder names. |
| 2088 | PROCESS is the flists process that was run to collect folder names and the | 2118 | PROCESS is the flists process that was run to collect folder |
| 2089 | function is called when OUTPUT is available." | 2119 | names and the function is called when OUTPUT is available." |
| 2090 | (let ((position 0) | 2120 | (let ((position 0) |
| 2091 | (prevailing-match-data (match-data)) | 2121 | (prevailing-match-data (match-data)) |
| 2092 | line-end folder) | 2122 | line-end folder) |
| @@ -2124,16 +2154,18 @@ function is called when OUTPUT is available." | |||
| 2124 | (defun mh-normalize-folder-name (folder &optional empty-string-okay | 2154 | (defun mh-normalize-folder-name (folder &optional empty-string-okay |
| 2125 | dont-remove-trailing-slash) | 2155 | dont-remove-trailing-slash) |
| 2126 | "Normalizes FOLDER name. | 2156 | "Normalizes FOLDER name. |
| 2127 | Makes sure that two '/' characters never occur next to each other. Also all | ||
| 2128 | occurrences of \"..\" and \".\" are suitably processed. So \"+inbox/../news\" | ||
| 2129 | will be normalized to \"+news\". | ||
| 2130 | 2157 | ||
| 2131 | If optional argument EMPTY-STRING-OKAY is nil then a '+' is added at the | 2158 | Makes sure that two '/' characters never occur next to each |
| 2132 | front if FOLDER lacks one. If non-nil and FOLDER is the empty string then | 2159 | other. Also all occurrences of \"..\" and \".\" are suitably |
| 2133 | nothing is added. | 2160 | processed. So \"+inbox/../news\" will be normalized to \"+news\". |
| 2134 | 2161 | ||
| 2135 | If optional argument DONT-REMOVE-TRAILING-SLASH is non-nil then a trailing '/' | 2162 | If optional argument EMPTY-STRING-OKAY is nil then a '+' is added |
| 2136 | if present is retained (if present), otherwise it is removed." | 2163 | at the front if FOLDER lacks one. If non-nil and FOLDER is the |
| 2164 | empty string then nothing is added. | ||
| 2165 | |||
| 2166 | If optional argument DONT-REMOVE-TRAILING-SLASH is non-nil then a | ||
| 2167 | trailing '/' if present is retained (if present), otherwise it is | ||
| 2168 | removed." | ||
| 2137 | (when (stringp folder) | 2169 | (when (stringp folder) |
| 2138 | ;; Replace two or more consecutive '/' characters with a single '/' | 2170 | ;; Replace two or more consecutive '/' characters with a single '/' |
| 2139 | (while (string-match "//" folder) | 2171 | (while (string-match "//" folder) |
| @@ -2176,11 +2208,12 @@ if present is retained (if present), otherwise it is removed." | |||
| 2176 | 2208 | ||
| 2177 | (defun mh-sub-folders (folder &optional add-trailing-slash-flag) | 2209 | (defun mh-sub-folders (folder &optional add-trailing-slash-flag) |
| 2178 | "Find the subfolders of FOLDER. | 2210 | "Find the subfolders of FOLDER. |
| 2179 | The function avoids running folders unnecessarily by caching the results of | 2211 | The function avoids running folders unnecessarily by caching the |
| 2180 | the actual folders call. | 2212 | results of the actual folders call. |
| 2181 | 2213 | ||
| 2182 | If optional argument ADD-TRAILING-SLASH-FLAG is non-nil then a slash is added | 2214 | If optional argument ADD-TRAILING-SLASH-FLAG is non-nil then a |
| 2183 | to each of the sub-folder names that may have nested folders within them." | 2215 | slash is added to each of the sub-folder names that may have |
| 2216 | nested folders within them." | ||
| 2184 | (let* ((folder (mh-normalize-folder-name folder)) | 2217 | (let* ((folder (mh-normalize-folder-name folder)) |
| 2185 | (match (gethash folder mh-sub-folders-cache 'no-result)) | 2218 | (match (gethash folder mh-sub-folders-cache 'no-result)) |
| 2186 | (sub-folders (cond ((eq match 'no-result) | 2219 | (sub-folders (cond ((eq match 'no-result) |
| @@ -2195,8 +2228,8 @@ to each of the sub-folder names that may have nested folders within them." | |||
| 2195 | 2228 | ||
| 2196 | (defun mh-sub-folders-actual (folder) | 2229 | (defun mh-sub-folders-actual (folder) |
| 2197 | "Execute the command folders to return the sub-folders of FOLDER. | 2230 | "Execute the command folders to return the sub-folders of FOLDER. |
| 2198 | Filters out the folder names that start with \".\" so that directories that | 2231 | Filters out the folder names that start with \".\" so that |
| 2199 | aren't usually mail folders are hidden." | 2232 | directories that aren't usually mail folders are hidden." |
| 2200 | (let ((arg-list `(,(expand-file-name "folders" mh-progs) | 2233 | (let ((arg-list `(,(expand-file-name "folders" mh-progs) |
| 2201 | nil (t nil) nil "-noheader" "-norecurse" "-nototal" | 2234 | nil (t nil) nil "-noheader" "-norecurse" "-nototal" |
| 2202 | ,@(if (stringp folder) (list folder) ()))) | 2235 | ,@(if (stringp folder) (list folder) ()))) |
| @@ -2243,13 +2276,15 @@ aren't usually mail folders are hidden." | |||
| 2243 | 2276 | ||
| 2244 | (defun mh-remove-from-sub-folders-cache (folder) | 2277 | (defun mh-remove-from-sub-folders-cache (folder) |
| 2245 | "Remove FOLDER and its parent from `mh-sub-folders-cache'. | 2278 | "Remove FOLDER and its parent from `mh-sub-folders-cache'. |
| 2246 | FOLDER should be unconditionally removed from the cache. Also the last ancestor | 2279 | FOLDER should be unconditionally removed from the cache. Also the |
| 2247 | of FOLDER present in the cache must be removed as well. | 2280 | last ancestor of FOLDER present in the cache must be removed as |
| 2248 | 2281 | well. | |
| 2249 | To see why this is needed assume we have a folder +foo which has a single | 2282 | |
| 2250 | sub-folder qux. Now we create the folder +foo/bar/baz. Here we will need to | 2283 | To see why this is needed assume we have a folder +foo which has |
| 2251 | invalidate the cached sub-folders of +foo, otherwise completion on +foo won't | 2284 | a single sub-folder qux. Now we create the folder +foo/bar/baz. |
| 2252 | tell us about the option +foo/bar!" | 2285 | Here we will need to invalidate the cached sub-folders of +foo, |
| 2286 | otherwise completion on +foo won't tell us about the option | ||
| 2287 | +foo/bar!" | ||
| 2253 | (remhash folder mh-sub-folders-cache) | 2288 | (remhash folder mh-sub-folders-cache) |
| 2254 | (block ancestor-found | 2289 | (block ancestor-found |
| 2255 | (let ((parent folder) | 2290 | (let ((parent folder) |
| @@ -2270,8 +2305,9 @@ tell us about the option +foo/bar!" | |||
| 2270 | 2305 | ||
| 2271 | (defvar mh-allow-root-folder-flag nil | 2306 | (defvar mh-allow-root-folder-flag nil |
| 2272 | "Non-nil means \"+\" is an acceptable folder name. | 2307 | "Non-nil means \"+\" is an acceptable folder name. |
| 2273 | This variable is used to communicate with `mh-folder-completion-function'. That | 2308 | This variable is used to communicate with |
| 2274 | function can have exactly three arguments so we bind this variable to t or nil. | 2309 | `mh-folder-completion-function'. That function can have exactly |
| 2310 | three arguments so we bind this variable to t or nil. | ||
| 2275 | 2311 | ||
| 2276 | This variable should never be set.") | 2312 | This variable should never be set.") |
| 2277 | 2313 | ||
| @@ -2288,9 +2324,9 @@ This variable should never be set.") | |||
| 2288 | 2324 | ||
| 2289 | (defun mh-folder-completion-function (name predicate flag) | 2325 | (defun mh-folder-completion-function (name predicate flag) |
| 2290 | "Programmable completion for folder names. | 2326 | "Programmable completion for folder names. |
| 2291 | NAME is the partial folder name that has been input. PREDICATE if non-nil is a | 2327 | NAME is the partial folder name that has been input. PREDICATE if |
| 2292 | function that is used to filter the possible choices and FLAG determines | 2328 | non-nil is a function that is used to filter the possible choices |
| 2293 | whether the completion is over." | 2329 | and FLAG determines whether the completion is over." |
| 2294 | (let* ((orig-name name) | 2330 | (let* ((orig-name name) |
| 2295 | (name (mh-normalize-folder-name name nil t)) | 2331 | (name (mh-normalize-folder-name name nil t)) |
| 2296 | (last-slash (mh-search-from-end ?/ name)) | 2332 | (last-slash (mh-search-from-end ?/ name)) |
| @@ -2325,8 +2361,8 @@ whether the completion is over." | |||
| 2325 | 2361 | ||
| 2326 | (defun mh-folder-completing-read (prompt default allow-root-folder-flag) | 2362 | (defun mh-folder-completing-read (prompt default allow-root-folder-flag) |
| 2327 | "Read folder name with PROMPT and default result DEFAULT. | 2363 | "Read folder name with PROMPT and default result DEFAULT. |
| 2328 | If ALLOW-ROOT-FOLDER-FLAG is non-nil then \"+\" is allowed to be a folder name | 2364 | If ALLOW-ROOT-FOLDER-FLAG is non-nil then \"+\" is allowed to be |
| 2329 | corresponding to `mh-user-path'." | 2365 | a folder name corresponding to `mh-user-path'." |
| 2330 | (mh-normalize-folder-name | 2366 | (mh-normalize-folder-name |
| 2331 | (let ((minibuffer-completing-file-name t) | 2367 | (let ((minibuffer-completing-file-name t) |
| 2332 | (completion-root-regexp "^[+/]") | 2368 | (completion-root-regexp "^[+/]") |
| @@ -2339,12 +2375,13 @@ corresponding to `mh-user-path'." | |||
| 2339 | (defun mh-prompt-for-folder (prompt default can-create | 2375 | (defun mh-prompt-for-folder (prompt default can-create |
| 2340 | &optional default-string allow-root-folder-flag) | 2376 | &optional default-string allow-root-folder-flag) |
| 2341 | "Prompt for a folder name with PROMPT. | 2377 | "Prompt for a folder name with PROMPT. |
| 2342 | Returns the folder's name as a string. DEFAULT is used if the folder exists | 2378 | Returns the folder's name as a string. DEFAULT is used if the |
| 2343 | and the user types return. If the CAN-CREATE flag is t, then a folder is | 2379 | folder exists and the user types return. If the CAN-CREATE flag |
| 2344 | created if it doesn't already exist. If optional argument DEFAULT-STRING is | 2380 | is t, then a folder is created if it doesn't already exist. If |
| 2345 | non-nil, use it in the prompt instead of DEFAULT. If ALLOW-ROOT-FOLDER-FLAG is | 2381 | optional argument DEFAULT-STRING is non-nil, use it in the prompt |
| 2346 | non-nil then the function will accept the folder +, which means all folders | 2382 | instead of DEFAULT. If ALLOW-ROOT-FOLDER-FLAG is non-nil then the |
| 2347 | when used in searching." | 2383 | function will accept the folder +, which means all folders when |
| 2384 | used in searching." | ||
| 2348 | (if (null default) | 2385 | (if (null default) |
| 2349 | (setq default "")) | 2386 | (setq default "")) |
| 2350 | (let* ((default-string (cond (default-string (format " (default %s)" default-string)) | 2387 | (let* ((default-string (cond (default-string (format " (default %s)" default-string)) |
| @@ -2397,9 +2434,10 @@ when used in searching." | |||
| 2397 | 2434 | ||
| 2398 | (defun mh-truncate-log-buffer () | 2435 | (defun mh-truncate-log-buffer () |
| 2399 | "If `mh-log-buffer' is too big then truncate it. | 2436 | "If `mh-log-buffer' is too big then truncate it. |
| 2400 | If the number of lines in `mh-log-buffer' exceeds `mh-log-buffer-lines' then | 2437 | If the number of lines in `mh-log-buffer' exceeds |
| 2401 | keep only the last `mh-log-buffer-lines'. As a side effect the point is set to | 2438 | `mh-log-buffer-lines' then keep only the last |
| 2402 | the end of the log buffer. | 2439 | `mh-log-buffer-lines'. As a side effect the point is set to the |
| 2440 | end of the log buffer. | ||
| 2403 | 2441 | ||
| 2404 | The function returns the size of the final size of the log buffer." | 2442 | The function returns the size of the final size of the log buffer." |
| 2405 | (with-current-buffer (get-buffer-create mh-log-buffer) | 2443 | (with-current-buffer (get-buffer-create mh-log-buffer) |
| @@ -2419,9 +2457,9 @@ The function returns the size of the final size of the log buffer." | |||
| 2419 | 2457 | ||
| 2420 | (defun mh-exec-cmd (command &rest args) | 2458 | (defun mh-exec-cmd (command &rest args) |
| 2421 | "Execute mh-command COMMAND with ARGS. | 2459 | "Execute mh-command COMMAND with ARGS. |
| 2422 | The side effects are what is desired. | 2460 | The side effects are what is desired. Any output is assumed to be |
| 2423 | Any output is assumed to be an error and is shown to the user. | 2461 | an error and is shown to the user. The output is not read or |
| 2424 | The output is not read or parsed by MH-E." | 2462 | parsed by MH-E." |
| 2425 | (save-excursion | 2463 | (save-excursion |
| 2426 | (set-buffer (get-buffer-create mh-log-buffer)) | 2464 | (set-buffer (get-buffer-create mh-log-buffer)) |
| 2427 | (let* ((initial-size (mh-truncate-log-buffer)) | 2465 | (let* ((initial-size (mh-truncate-log-buffer)) |
| @@ -2458,9 +2496,9 @@ Signals an error if process does not complete successfully." | |||
| 2458 | (defun mh-exec-cmd-daemon (command filter &rest args) | 2496 | (defun mh-exec-cmd-daemon (command filter &rest args) |
| 2459 | "Execute MH command COMMAND in the background. | 2497 | "Execute MH command COMMAND in the background. |
| 2460 | 2498 | ||
| 2461 | If FILTER is non-nil then it is used to process the output otherwise the | 2499 | If FILTER is non-nil then it is used to process the output |
| 2462 | default filter `mh-process-daemon' is used. See `set-process-filter' for more | 2500 | otherwise the default filter `mh-process-daemon' is used. See |
| 2463 | details of FILTER. | 2501 | `set-process-filter' for more details of FILTER. |
| 2464 | 2502 | ||
| 2465 | ARGS are passed to COMMAND as command line arguments." | 2503 | ARGS are passed to COMMAND as command line arguments." |
| 2466 | (save-excursion | 2504 | (save-excursion |
| @@ -2480,9 +2518,9 @@ ARGS are passed to COMMAND as command line arguments." | |||
| 2480 | ENV is nil or a string of space-separated \"var=value\" elements. | 2518 | ENV is nil or a string of space-separated \"var=value\" elements. |
| 2481 | Signals an error if process does not complete successfully. | 2519 | Signals an error if process does not complete successfully. |
| 2482 | 2520 | ||
| 2483 | If FILTER is non-nil then it is used to process the output otherwise the | 2521 | If FILTER is non-nil then it is used to process the output |
| 2484 | default filter `mh-process-daemon' is used. See `set-process-filter' for more | 2522 | otherwise the default filter `mh-process-daemon' is used. See |
| 2485 | details of FILTER. | 2523 | `set-process-filter' for more details of FILTER. |
| 2486 | 2524 | ||
| 2487 | ARGS are passed to COMMAND as command line arguments." | 2525 | ARGS are passed to COMMAND as command line arguments." |
| 2488 | (let ((process-environment process-environment)) | 2526 | (let ((process-environment process-environment)) |
| @@ -2492,17 +2530,20 @@ ARGS are passed to COMMAND as command line arguments." | |||
| 2492 | 2530 | ||
| 2493 | (defun mh-process-daemon (process output) | 2531 | (defun mh-process-daemon (process output) |
| 2494 | "PROCESS daemon that puts OUTPUT into a temporary buffer. | 2532 | "PROCESS daemon that puts OUTPUT into a temporary buffer. |
| 2495 | Any output from the process is displayed in an asynchronous pop-up window." | 2533 | Any output from the process is displayed in an asynchronous |
| 2534 | pop-up window." | ||
| 2496 | (set-buffer (get-buffer-create mh-log-buffer)) | 2535 | (set-buffer (get-buffer-create mh-log-buffer)) |
| 2497 | (insert-before-markers output) | 2536 | (insert-before-markers output) |
| 2498 | (display-buffer mh-log-buffer)) | 2537 | (display-buffer mh-log-buffer)) |
| 2499 | 2538 | ||
| 2500 | (defun mh-exec-cmd-quiet (raise-error command &rest args) | 2539 | (defun mh-exec-cmd-quiet (raise-error command &rest args) |
| 2501 | "Signal RAISE-ERROR if COMMAND with ARGS fails. | 2540 | "Signal RAISE-ERROR if COMMAND with ARGS fails. |
| 2502 | Execute MH command COMMAND with ARGS. ARGS is a list of strings. | 2541 | Execute MH command COMMAND with ARGS. ARGS is a list of strings. |
| 2503 | Return at start of mh-temp buffer, where output can be parsed and used. | 2542 | Return at start of mh-temp buffer, where output can be parsed and |
| 2504 | Returns value of `call-process', which is 0 for success, unless RAISE-ERROR is | 2543 | used. |
| 2505 | non-nil, in which case an error is signaled if `call-process' returns non-0." | 2544 | Returns value of `call-process', which is 0 for success, unless |
| 2545 | RAISE-ERROR is non-nil, in which case an error is signaled if | ||
| 2546 | `call-process' returns non-0." | ||
| 2506 | (set-buffer (get-buffer-create mh-temp-buffer)) | 2547 | (set-buffer (get-buffer-create mh-temp-buffer)) |
| 2507 | (erase-buffer) | 2548 | (erase-buffer) |
| 2508 | (let ((value | 2549 | (let ((value |
| @@ -2522,8 +2563,8 @@ non-nil, in which case an error is signaled if `call-process' returns non-0." | |||
| 2522 | 2563 | ||
| 2523 | (defun mh-exchange-point-and-mark-preserving-active-mark () | 2564 | (defun mh-exchange-point-and-mark-preserving-active-mark () |
| 2524 | "Put the mark where point is now, and point where the mark is now. | 2565 | "Put the mark where point is now, and point where the mark is now. |
| 2525 | This command works even when the mark is not active, and preserves whether the | 2566 | This command works even when the mark is not active, and |
| 2526 | mark is active or not." | 2567 | preserves whether the mark is active or not." |
| 2527 | (interactive nil) | 2568 | (interactive nil) |
| 2528 | (let ((is-active (and (boundp 'mark-active) mark-active))) | 2569 | (let ((is-active (and (boundp 'mark-active) mark-active))) |
| 2529 | (let ((omark (mark t))) | 2570 | (let ((omark (mark t))) |
| @@ -2537,7 +2578,8 @@ mark is active or not." | |||
| 2537 | 2578 | ||
| 2538 | (defun mh-exec-cmd-output (command display &rest args) | 2579 | (defun mh-exec-cmd-output (command display &rest args) |
| 2539 | "Execute MH command COMMAND with DISPLAY flag and ARGS. | 2580 | "Execute MH command COMMAND with DISPLAY flag and ARGS. |
| 2540 | Put the output into buffer after point. Set mark after inserted text. | 2581 | Put the output into buffer after point. |
| 2582 | Set mark after inserted text. | ||
| 2541 | Output is expected to be shown to user, not parsed by MH-E." | 2583 | Output is expected to be shown to user, not parsed by MH-E." |
| 2542 | (push-mark (point) t) | 2584 | (push-mark (point) t) |
| 2543 | (apply 'call-process | 2585 | (apply 'call-process |
| @@ -2553,7 +2595,8 @@ Output is expected to be shown to user, not parsed by MH-E." | |||
| 2553 | 2595 | ||
| 2554 | (defun mh-exec-lib-cmd-output (command &rest args) | 2596 | (defun mh-exec-lib-cmd-output (command &rest args) |
| 2555 | "Execute MH library command COMMAND with ARGS. | 2597 | "Execute MH library command COMMAND with ARGS. |
| 2556 | Put the output into buffer after point. Set mark after inserted text." | 2598 | Put the output into buffer after point. |
| 2599 | Set mark after inserted text." | ||
| 2557 | (apply 'mh-exec-cmd-output (expand-file-name command mh-lib-progs) nil args)) | 2600 | (apply 'mh-exec-cmd-output (expand-file-name command mh-lib-progs) nil args)) |
| 2558 | 2601 | ||
| 2559 | (defun mh-handle-process-error (command status) | 2602 | (defun mh-handle-process-error (command status) |
| @@ -2605,11 +2648,13 @@ Put the output into buffer after point. Set mark after inserted text." | |||
| 2605 | "Replace REGEXP with NEWTEXT everywhere in STRING and return result. | 2648 | "Replace REGEXP with NEWTEXT everywhere in STRING and return result. |
| 2606 | NEWTEXT is taken literally---no \\DIGIT escapes will be recognized. | 2649 | NEWTEXT is taken literally---no \\DIGIT escapes will be recognized. |
| 2607 | 2650 | ||
| 2608 | The function body was copied from `dired-replace-in-string' in dired.el. | 2651 | The function body was copied from `dired-replace-in-string' in |
| 2609 | Emacs21 has `replace-regexp-in-string' while XEmacs has `replace-in-string'. | 2652 | dired.el. |
| 2610 | Neither is present in Emacs20. The file gnus-util.el in Gnus 5.10.1 and above | 2653 | Emacs21 has `replace-regexp-in-string' while XEmacs has |
| 2611 | has `gnus-replace-in-string'. We should use that when we decide to not support | 2654 | `replace-in-string'. |
| 2612 | older versions of Gnus." | 2655 | Neither is present in Emacs20. The file gnus-util.el in Gnus 5.10.1 |
| 2656 | and above has `gnus-replace-in-string'. We should use that when we | ||
| 2657 | decide to not support older versions of Gnus." | ||
| 2613 | (let ((result "") (start 0) mb me) | 2658 | (let ((result "") (start 0) mb me) |
| 2614 | (while (string-match regexp string start) | 2659 | (while (string-match regexp string start) |
| 2615 | (setq mb (match-beginning 0) | 2660 | (setq mb (match-beginning 0) |