;;; mh-comp.el --- MH-E functions for composing messages
-;; Copyright (C) 1993, 95, 1997,
-;; 2000, 01, 02, 03, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995, 1997,
+;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
(defvar mh-identity-menu)
;;; Autoloads
-(autoload 'Info-goto-node "info")
(autoload 'mail-mode-fill-paragraph "sendmail")
(autoload 'mm-handle-displayed-p "mm-decode")
cc/all sender and all recipients.
If optional prefix argument INCLUDEP provided, then include the message
in the reply using filter `mhl.reply' in your MH directory.
-If the file named by `mh-repl-formfile' exists, it is used as a skeleton
-for the reply.
+If the file named by `mh-repl-formfile' exists, it is used as a skeleton for
+the reply. If REPLY-TO is cc or all and you're using either the nmh or GNU
+mailutils variants and the file names by `mh-repl-group-formfile' exists, it
+is used instead.
See also `mh-send'."
(interactive (list
)))
components)
(t
- (error (format "Can't find components file \"%s\""
- components)))))
+ (error "Can't find components file \"%s\""
+ components))))
nil)))
(mh-insert-fields "To:" to "Subject:" subject "Cc:" cc)
(goto-char (point-max))
(setq data-begin (match-end 0))
(setq field (match-string 1)))
(setq data-begin (max point data-begin))
- (if (and field (mh-letter-skipped-header-field-p field))
- (set-match-data nil)
- (set-match-data (list data-begin data-end data-begin data-end)))
(goto-char (if (equal point data-end) (1+ data-end) data-end))
- t)))
+ (cond ((and field (mh-letter-skipped-header-field-p field))
+ (set-match-data nil)
+ nil)
+ (t (set-match-data
+ (list data-begin data-end data-begin data-end))
+ t)))))
(defun mh-letter-header-end ()
"Find the end of the message header.
(value (cdar entry-list)))
(cond
((equal ":identity" field)
- (when (and (not mh-identity-local)
- (assoc value mh-identity-list))
+ (when ;;(and (not mh-identity-local)
+ ;; Bug 1204506. But do we need to be able
+ ;; to set an identity manually that won't be
+ ;; overridden by mh-insert-auto-fields?
+ (assoc value mh-identity-list)
+ ;;)
(mh-insert-identity value)))
(t
(mh-modify-header-field field value
and point after it."
(interactive
(list (mh-prompt-for-folder "Message from" mh-sent-from-folder nil)
- (read-input (format "Message number%s: "
+ (read-input (concat "Message number"
(if (numberp mh-sent-from-msg)
- (format " [%d]" mh-sent-from-msg)
- "")))
+ (format " (default %d): " mh-sent-from-msg)
+ ": ")))
current-prefix-arg))
(save-restriction
(narrow-to-region (point) (point))
(defun mh-complete-word (word choices begin end)
"Complete WORD at from CHOICES.
Any match found replaces the text from BEGIN to END."
- (let ((completion (try-completion word choices)))
+ (let ((completion (try-completion word choices))
+ (completions-buffer "*Completions*"))
(cond ((eq completion t)
+ (ignore-errors
+ (kill-buffer completions-buffer))
(message "Completed: %s" word))
((null completion)
+ (ignore-errors
+ (kill-buffer completions-buffer))
(message "No completion for `%s'" word))
((stringp completion)
(if (equal word completion)
- (with-output-to-temp-buffer "*Completions*"
+ (with-output-to-temp-buffer completions-buffer
(display-completion-list (all-completions word choices)))
+ (ignore-errors
+ (kill-buffer completions-buffer))
(delete-region begin end)
(insert completion))))))
;; "C-c /" prefix is used in mh-letter-mode by pgp.el and mailcrypt.el.
-;;;###autoload(add-to-list 'auto-mode-alist '("/drafts/[0-9]+\\'" . mh-letter-mode))
-
(provide 'mh-comp)
;;; Local Variables: