]> code.delx.au - gnu-emacs/blobdiff - lisp/mail/sendmail.el
Merge from emacs-24; up to 2012-12-17T11:17:34Z!rgm@gnu.org
[gnu-emacs] / lisp / mail / sendmail.el
index cd3862985bd5c912aada8636e7de491c7bd6bd3d..e1dee3295f2415b39cf8c7a3ad8916f9d714a64b 100644 (file)
@@ -1,7 +1,7 @@
 ;;; sendmail.el --- mail sending commands for Emacs
 
-;; Copyright (C) 1985-1986, 1992-1996, 1998, 2000-2012
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1992-1996, 1998, 2000-2013 Free Software
+;; Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: mail
@@ -243,15 +243,14 @@ Used by `mail-yank-original' via `mail-indent-citation'."
   :type 'integer
   :group 'sendmail)
 
-;; FIXME make it really obsolete.
 (defvar mail-yank-hooks nil
   "Obsolete hook for modifying a citation just inserted in the mail buffer.
 Each hook function can find the citation between (point) and (mark t).
 And each hook function should leave point and mark around the citation
 text as modified.
-
 This is a normal hook, misnamed for historical reasons.
-It is semi-obsolete and mail agents should no longer use it.")
+It is obsolete and mail agents should no longer use it.")
+(make-obsolete-variable 'mail-yank-hooks 'mail-citation-hook "19.34")
 
 ;;;###autoload
 (defcustom mail-citation-hook nil
@@ -616,7 +615,7 @@ This also saves the value of `send-mail-function' via Customize."
   ;; (kill-local-variable 'enable-multibyte-characters)
   (set-buffer-multibyte (default-value 'enable-multibyte-characters))
   (if current-input-method
-      (inactivate-input-method))
+      (deactivate-input-method))
 
   ;; Local variables for Mail mode.
   (setq mail-send-actions actions)
@@ -1414,6 +1413,7 @@ just append to the file, in Babyl format if necessary."
 
 (defun mail-sent-via ()
   "Make a Sent-via header line from each To or CC header line."
+  (declare (obsolete "nobody can remember what it is for." "24.1"))
   (interactive)
   (save-excursion
     ;; put a marker at the end of the header
@@ -1433,9 +1433,6 @@ just append to the file, in Babyl format if necessary."
                                   (point)))))
          ;; Insert a copy, with altered header field name.
          (insert-before-markers "Sent-via:" to-line))))))
-
-(make-obsolete 'mail-sent-via "nobody can remember what it is for." "24.1")
-
 \f
 (defun mail-to ()
   "Move point to end of To field, creating it if necessary."
@@ -1496,6 +1493,9 @@ just append to the file, in Babyl format if necessary."
            (insert "\nMail-Followup-To: "))))
 
 (defun mail-position-on-field (field &optional soft)
+  "Move to the start of the contents of header field FIELD.
+If there is none, insert one, unless SOFT is non-nil.
+If there are multiple FIELD fields, this goes to the first."
   (let (end
        (case-fold-search t))
     (setq end (mail-header-end))
@@ -1678,7 +1678,8 @@ Just \\[universal-argument] as argument means don't indent, insert no prefix,
 and don't delete any header fields."
   (interactive "P")
   (and (consp mail-reply-action)
-       (eq (car mail-reply-action) 'insert-buffer)
+       (memq (car mail-reply-action)
+            '(rmail-yank-current-message insert-buffer))
        (with-current-buffer (nth 1 mail-reply-action)
         (or (mark t)
             (error "No mark set: %S" (current-buffer))))