2000-12-24 11:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Sun, 24 Dec 2000 16:11:43 +0000 (16:11 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Sun, 24 Dec 2000 16:11:43 +0000 (16:11 +0000)
* message.el (message-mail): Support yank-action.

* message.el (message-setup): Revoke the last change.

lisp/ChangeLog
lisp/message.el

index 1678f25..e9bdd69 100644 (file)
@@ -1,3 +1,9 @@
+2000-12-24 11:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * message.el (message-mail): Support yank-action.
+
+       * message.el (message-setup): Revoke the last change.
+
 2000-12-24 01:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * message.el (message-setup): Use cons. Suggested by Johan Vromans
index 7c287b5..ff45555 100644 (file)
@@ -3698,7 +3698,7 @@ than 988 characters long, and if they are not, trim them until they are."
     (if (not (and message-this-is-mail mua))
        (message-setup-1 headers replybuffer actions)
       (if replybuffer
-         (setq yank-action (cons 'insert-buffer replybuffer)))
+         (setq yank-action (list 'insert-buffer replybuffer)))
       (setq headers (copy-sequence headers))
       (setq field (assq 'Subject headers))
       (when field
@@ -3831,13 +3831,20 @@ than 988 characters long, and if they are not, trim them until they are."
   "Start editing a mail message to be sent.
 OTHER-HEADERS is an alist of header/value pairs."
   (interactive)
-  (let ((message-this-is-mail t))
+  (let ((message-this-is-mail t) replybuffer)
     (unless (message-mail-user-agent)
       (message-pop-to-buffer (message-buffer-name "mail" to)))
+    ;; FIXME: message-mail should do something if YANK-ACTION is not
+    ;; insert-buffer.
+    (and (consp yank-action) (eq (car yank-action) 'insert-buffer)
+        (setq replybuffer (nth 1 yank-action)))
     (message-setup
      (nconc
       `((To . ,(or to "")) (Subject . ,(or subject "")))
-      (when other-headers other-headers)))))
+      (when other-headers other-headers))
+     replybuffer)
+    ;; FIXME: Should return nil if failure.
+    t))
 
 ;;;###autoload
 (defun message-news (&optional newsgroups subject)