comparison lisp/url/url-mailto.el @ 83381:d84f940244dc

Merged from miles@gnu.org--gnu-2005 (patch 116-117, 544-550) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-544 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-545 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-546 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-547 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-548 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-549 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-550 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-116 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-117 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-421
author Karoly Lorentey <lorentey@elte.hu>
date Sat, 17 Sep 2005 19:10:55 +0000
parents 532e0a9335a9 75da5ea5fb14
children 2a679c81f552
comparison
equal deleted inserted replaced
83380:94f174e5569d 83381:d84f940244dc
90 (setcdr tolist 90 (setcdr tolist
91 (list (concat to ", " (cadr tolist))))) 91 (list (concat to ", " (cadr tolist)))))
92 (setq args (cons (list "to" to) args)))) 92 (setq args (cons (list "to" to) args))))
93 93
94 (setq subject (cdr-safe (assoc "subject" args))) 94 (setq subject (cdr-safe (assoc "subject" args)))
95 (if (fboundp url-mail-command) (funcall url-mail-command) (mail)) 95 (if (fboundp url-mail-command)
96 (if (eq url-mail-command 'compose-mail)
97 (compose-mail nil nil nil 'new)
98 (funcall url-mail-command))
99 (mail 'new))
96 (while args 100 (while args
97 (if (string= (caar args) "body") 101 (if (string= (caar args) "body")
98 (progn 102 (progn
99 (goto-char (point-max)) 103 (goto-char (point-max))
100 (insert (mapconcat 104 (insert (mapconcat
122 (goto-char (point-max)) 126 (goto-char (point-max))
123 (insert url-request-data) 127 (insert url-request-data)
124 ;; It seems Microsoft-ish to send without warning. 128 ;; It seems Microsoft-ish to send without warning.
125 ;; Fixme: presumably this should depend on a privacy setting. 129 ;; Fixme: presumably this should depend on a privacy setting.
126 (if (y-or-n-p "Send this auto-generated mail? ") 130 (if (y-or-n-p "Send this auto-generated mail? ")
127 (cond ((eq url-mail-command 'compose-mail) 131 (let ((buffer (current-buffer)))
128 (funcall (get mail-user-agent 'sendfunc) nil)) 132 (cond ((eq url-mail-command 'compose-mail)
129 ;; otherwise, we can't be sure 133 (funcall (get mail-user-agent 'sendfunc) nil))
130 ((fboundp 'message-send-and-exit) 134 ;; otherwise, we can't be sure
131 (message-send-and-exit)) 135 ((fboundp 'message-send-and-exit)
132 (t (mail-send-and-exit nil))))) 136 (message-send-and-exit))
137 (t (mail-send-and-exit nil)))
138 (kill-buffer buffer))))
133 nil)) 139 nil))
134 140
135 (provide 'url-mailto) 141 (provide 'url-mailto)
136 142
137 ;; arch-tag: 7b7ad52e-8760-497b-9444-75fae14e34c5 143 ;; arch-tag: 7b7ad52e-8760-497b-9444-75fae14e34c5