]> code.delx.au - gnu-emacs/blobdiff - lisp/mh-e/mh-comp.el
(desktop-load-file): Do nothing when FUNCTION is nil.
[gnu-emacs] / lisp / mh-e / mh-comp.el
index 82d0f5b7fd734f3246c89616af8735ceb35fc9f5..a7af192ec4060f8adc65fb1c08765e8e39871838 100644 (file)
@@ -1,7 +1,7 @@
 ;;; mh-comp.el --- MH-E functions for composing messages
 
 ;; Copyright (C) 1993, 1995, 1997,
-;;  2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+;;  2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 ;; Author: Bill Wohler <wohler@newt.com>
 ;; Maintainer: Bill Wohler <wohler@newt.com>
@@ -22,8 +22,8 @@
 
 ;; 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:
 
@@ -623,8 +623,8 @@ CONFIG is the window configuration before sending mail."
                                                )))
                       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))
@@ -979,11 +979,13 @@ When a message is composed, the hooks `text-mode-hook' and
            (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.
@@ -1243,8 +1245,12 @@ Return t if fields added; otherwise return nil."
                           (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
@@ -1424,10 +1430,10 @@ not indent and do not delete headers.  Leaves the mark before the letter
 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))