/[emacs]/emacs/lisp/url/url-mailto.el
ViewVC logotype

Diff of /emacs/lisp/url/url-mailto.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by ttn, Sat Aug 6 15:55:38 2005 UTC revision 1.10 by cyd, Thu Sep 1 16:38:39 2005 UTC
# Line 73  Line 73 
73          (setq headers-start (match-end 0)          (setq headers-start (match-end 0)
74                to (url-unhex-string (substring url 0 (match-beginning 0)))                to (url-unhex-string (substring url 0 (match-beginning 0)))
75                args (url-parse-query-string                args (url-parse-query-string
76                      (substring url headers-start nil) t))                      (substring url headers-start nil) t t))
77        (setq to (url-unhex-string url)))        (setq to (url-unhex-string url)))
78      (setq source-url (url-view-url t))      (setq source-url (url-view-url t))
79      (if (and url-request-data (not (assoc "subject" args)))      (if (and url-request-data (not (assoc "subject" args)))
# Line 84  Line 84 
84      (if (and source-url (not (assoc "x-url-from" args)))      (if (and source-url (not (assoc "x-url-from" args)))
85          (setq args (cons (list "x-url-from" source-url) args)))          (setq args (cons (list "x-url-from" source-url) args)))
86    
87      (if (assoc "to" args)      (let ((tolist (assoc "to" args)))
88          (push (cdr (assoc "to" args)) to)        (if tolist
89        (setq args (cons (list "to" to) args)))            (if (not (string= to ""))
90                  (setcdr tolist
91                          (list (concat to ", " (nth 1 tolist)))))
92            (setq args (cons (list "to" to) args))))
93    
94      (setq subject (cdr-safe (assoc "subject" args)))      (setq subject (cdr-safe (assoc "subject" args)))
95      (if (fboundp url-mail-command) (funcall url-mail-command) (mail))      (if (fboundp url-mail-command) (funcall url-mail-command) (mail))
96      (while args      (while args
97        (if (string= (caar args) "body")        (if (string= (caar args) "body")
98            (progn            (progn
99              (goto-char (point-max))              (goto-char (point-max))
100              (insert (mapconcat 'identity (cdar args) "\n")))              (insert (mapconcat
101                         #'(lambda (string)
102                             (replace-regexp-in-string "\r\n" "\n" string))
103                         (cdar args) "\n")))
104          (url-mail-goto-field (caar args))          (url-mail-goto-field (caar args))
105          (setq func (intern-soft (concat "mail-" (caar args))))          (setq func (intern-soft (concat "mail-" (caar args))))
106          (insert (mapconcat 'identity (cdar args) ", ")))          (insert (mapconcat 'identity (cdar args) ", ")))

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26