;;; mh-e.el --- GNU Emacs interface to the MH mail system
-;; Copyright (C) 1985, 1986, 1987, 1988,
-;; 1990, 1992, 1993, 1994, 1995, 1997, 1999,
-;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;; Copyright (C) 1985-1988, 1990, 1992-1995, 1997, 1999-2012
;; Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
-;; Version: 8.1
+;; Version: 8.3.1
;; Keywords: mail
;; This file is part of GNU Emacs.
;; MH-E is an Emacs interface to the MH mail system.
-;; MH-E is supported in GNU Emacs 21 and 22, as well as XEmacs 21
+;; MH-E is supported in GNU Emacs 21 and higher, as well as XEmacs 21
;; (except for versions 21.5.9-21.5.16). It is compatible with MH
;; versions 6.8.4 and higher, all versions of nmh, and GNU mailutils
;; 1.0 and higher. Gnus is also required; version 5.10 or higher is
;; Try to keep variables local to a single file. Provide accessors if
;; variables are shared. Use this section as a last resort.
-(defconst mh-version "8.1" "Version number of MH-E.")
+(defconst mh-version "8.3.1" "Version number of MH-E.")
;; Variants
(defvar mh-show-buffer nil
"Buffer that displays message for this folder.")
-(defvar mh-showing-mode nil
- "If non-nil, show the message in a separate window.")
+(define-minor-mode mh-showing-mode
+ "Minor mode to show the message in a separate window."
+ ;; FIXME: maybe this should be moved to mh-show.el.
+ :lighter " Show")
(defvar mh-view-ops nil
"Stack of operations that change the folder view.
"Non-nil means that we have \"flists\".")
(defvar mh-index-data-file ".mhe_index"
- "MH-E specific file where index seach info is stored.")
+ "MH-E specific file where index search info is stored.")
(defvar mh-letter-header-field-regexp "^\\([A-Za-z][A-Za-z0-9-]*\\):")
The side effects are what is desired. Any output is assumed to be
an error and is shown to the user. The output is not read or
parsed by MH-E."
- (save-excursion
- (set-buffer (get-buffer-create mh-log-buffer))
+ (with-current-buffer (get-buffer-create mh-log-buffer)
(let* ((initial-size (mh-truncate-log-buffer))
(start (point))
(args (mh-list-to-string args)))
"In environment ENV, execute mh-command COMMAND with ARGS.
ENV is nil or a string of space-separated \"var=value\" elements.
Signals an error if process does not complete successfully."
- (save-excursion
- (set-buffer (get-buffer-create mh-temp-buffer))
+ (with-current-buffer (get-buffer-create mh-temp-buffer)
(erase-buffer)
(let ((process-environment process-environment))
;; XXX: We should purge the list that split-string returns of empty
`set-process-filter' for more details of FILTER.
ARGS are passed to COMMAND as command line arguments."
- (save-excursion
- (set-buffer (get-buffer-create mh-log-buffer))
+ (with-current-buffer (get-buffer-create mh-log-buffer)
(mh-truncate-log-buffer))
(let* ((process-connection-type nil)
(process (apply 'start-process
(mh-exchange-point-and-mark-preserving-active-mark))
;; Shush compiler.
-(defvar mark-active) ; XEmacs
+(mh-do-in-xemacs
+ (defvar mark-active))
(defun mh-exchange-point-and-mark-preserving-active-mark ()
"Put the mark where point is now, and point where the mark is now.
(insert (if (integerp status)
(format "%s: exit code %d\n" command status)
(format "%s: %s\n" command status)))
- (save-excursion
- (let ((error-message (buffer-substring (point-min) (point-max))))
- (set-buffer (get-buffer-create mh-log-buffer))
+ (let ((error-message (buffer-substring (point-min) (point-max))))
+ (with-current-buffer (get-buffer-create mh-log-buffer)
(mh-truncate-log-buffer)
(insert error-message)))
(error "%s failed, check buffer %s for error message"
(defun mh-variant-info (dir)
"Return MH variant found in DIR, or nil if none present."
- (save-excursion
- (let ((tmp-buffer (get-buffer-create mh-temp-buffer)))
- (set-buffer tmp-buffer)
+ (let ((tmp-buffer (get-buffer-create mh-temp-buffer)))
+ (with-current-buffer tmp-buffer
(cond
((mh-variant-mh-info dir))
((mh-variant-nmh-info dir))
(t
(message "Unknown variant %s; use %s"
variant
- (mapconcat '(lambda (x) (format "%s" (car x)))
+ (mapconcat (lambda (x) (format "%s" (car x)))
(mh-variants) " or "))))))
(defcustom-mh mh-variant 'autodetect
"*Non-nil means to expand aliases entered in the minibuffer.
In other words, aliases entered in the minibuffer will be
-expanded to the full address in the message draft. By default,
+expanded to the full address in the message draft. By default,
this expansion is not performed."
:type 'boolean
:group 'mh-alias
"Followup-To:" ; RFC 1036
"For-Approval:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
"For-Comment:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
- "For-Handdling:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
+ "For-Handling:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
"Forwarded:" ; MH
"From " ; sendmail
"Generate-Delivery-Report:" ; RFC 2156
"Original-NNTP-" ; mail to news
"Original-Path:" ; mail to news
"Original-Received:" ; mail to news
- "Original-Recipt:" ; RFC 2298
+ "Original-Recipient:" ; RFC 2298
"Original-To:" ; mail to news
"Original-X-" ; mail to news
"Origination-Client:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
"Seal-Send-Time:"
"See-Also:" ; H. Spencer: News Article Format and Transmission, June 1994
"Sensitivity:" ; RFC 2156, 2421
- "Speach-Act:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
+ "Speech-Act:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
"Status:" ; sendmail
"Supersedes:" ; H. Spencer: News Article Format and Transmission, June 1994
"Telefax:" ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
;; sentence-end-double-space: nil
;; End:
-;; arch-tag: cce884de-bd37-4104-9963-e4439d5ed22b
;;; mh-e.el ends here