;;; mh-comp.el --- MH-E functions for composing and sending messages
;; Copyright (C) 1993, 1995, 1997,
-;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; 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., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
"Regexp of header lines to remove before offering a message as a new draft\\<mh-folder-mode-map>.
Used by the \\[mh-edit-again] and \\[mh-extract-rejected-mail] commands.")
-(defvar mh-letter-mode-syntax-table nil
+(defvar mh-letter-mode-syntax-table
+ (let ((syntax-table (make-syntax-table text-mode-syntax-table)))
+ (modify-syntax-entry ?% "." syntax-table)
+ syntax-table)
"Syntax table used by MH-E while in MH-Letter mode.")
-(if mh-letter-mode-syntax-table
- ()
- (setq mh-letter-mode-syntax-table
- (make-syntax-table text-mode-syntax-table))
- (modify-syntax-entry ?% "." mh-letter-mode-syntax-table))
-
(defvar mh-send-args ""
"Extra args to pass to \"send\" command.")
by turning off the option `mh-auto-fields-prompt-flag'.
In case the MH \"send\" program is installed under a different name,
-use `mh-send-prog' to tell MH-E the name."
+use `mh-send-prog' to tell MH-E the name.
+
+The hook `mh-annotate-msg-hook' is run after annotating the
+message and scan line."
(interactive "P")
(run-hooks 'mh-before-send-letter-hook)
(if (and (mh-insert-auto-fields t)
(cond (arg
(pop-to-buffer mh-mail-delivery-buffer)
(erase-buffer)
- (mh-exec-cmd-output mh-send-prog t "-watch" "-nopush"
- "-nodraftfolder" mh-send-args file-name)
+ (mh-exec-cmd-output mh-send-prog t
+ "-nodraftfolder" "-watch" "-nopush"
+ (split-string mh-send-args) file-name)
(goto-char (point-max)) ; show the interesting part
(recenter -1)
(set-buffer draft-buffer)) ; for annotation below
(t
- (mh-exec-cmd-daemon mh-send-prog nil "-nodraftfolder" "-noverbose"
+ (mh-exec-cmd-daemon mh-send-prog nil
+ "-nodraftfolder" "-noverbose"
(split-string mh-send-args) file-name)))
(if mh-annotate-char
(mh-annotate-msg mh-sent-from-msg
Also investigate the command \\[mh-edit-again] for another way to
redistribute messages.
-See also `mh-redist-full-contents-flag'."
+See also `mh-redist-full-contents-flag'.
+
+The hook `mh-annotate-msg-hook' is run after annotating the
+message and scan line."
(interactive (list (mh-read-address "Redist-To: ")
(mh-read-address "Redist-Cc: ")
(mh-get-msg-num t)))
(defun mh-annotate-msg (msg folder note &rest args)
"Mark MSG in FOLDER with character NOTE and annotate message with ARGS.
-MSG can be a message number, a list of message numbers, or a sequence.
+MSG can be a message number, a list of message numbers, or a sequence.
The hook `mh-annotate-msg-hook' is run after annotating; see its
documentation for variables it can use."
(apply 'mh-exec-cmd "anno" folder