Commits

Anonymous committed 2b8bb4c

2004-05-16 Steve Youngs <steve@youngs.au.com>

* mozmail.el: Autoload `wl-draft' for wanderlust.
(mozmail-default-mua): Add Wanderlust.
(mozmail-compose-wanderlust): New.
Wanderlust additions are
From Markus Knittig <markus.knittig@arcor.de>

(mozmail-split-url): Allow for incorrect case used in mailto link
keywords.

Update commentary section.

Comments (0)

Files changed (2)

+2004-05-16  Steve Youngs  <steve@youngs.au.com>
+
+	* mozmail.el: Autoload `wl-draft' for wanderlust.
+	(mozmail-default-mua): Add Wanderlust.
+	(mozmail-compose-wanderlust): New.
+	Wanderlust additions are
+	From Markus Knittig <markus.knittig@arcor.de>
+
+	(mozmail-split-url): Allow for incorrect case used in mailto link
+	keywords.
+
+	Update commentary section.
+
 2004-04-01  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.42 released.
 ;; Copyright (C) 2003 Steve Youngs
 
 ;; RCS: $Id$
-;; Author:        Steve Youngs <sryoungs@bigpond.net.au>
-;; Maintainer:    Steve Youngs <sryoungs@bigpond.net.au>
+;; Author:        Steve Youngs <steve@youngs.au.com>
+;; Maintainer:    Steve Youngs <steve@youngs.au.com>
 ;; Created:       <2003-12-22>
-;; Last-Modified: <2004-04-01 18:40:10 (steve)>
+;; Last-Modified: <2004-05-16 20:16:50 (steve)>
 ;; Homepage:      None, contact maintainer for the latest version.
 ;;                Or get it from the XEmacs "net-utils" package.
 ;; Keywords:      mail
 
 ;;; Commentary:
 ;; 
-;;   Mozilla is a terrific web browser, but for mail and news I much
-;;   prefer XEmacs & Gnus.  Once this is set up, clicking on a mailto
-;;   link in Mozilla will fire up an XEmacs MUA with all the appropriate
-;;   fields filled in.  At this time, the only MUA that is supported is
-;;   Gnus (mainly because that is what I use).  Other MUAs (VM, MH-E,
-;;   MEW, RMAIL) will be added in due course.
+;;   Mozilla is a terrific web browser, but for mail and news I
+;;   much prefer XEmacs & Gnus.  Once this is set up, clicking on a
+;;   mailto link in Mozilla will fire up an (X)Emacs MUA with all
+;;   the appropriate fields filled in.  MUAs that are supported at
+;;   this time are: Gnus, VM, MH-E, MEW, Wanderlust, RMail, and the
+;;   built-in Emacs mailer.
 ;;
 ;; Setup (Mozilla):
 ;;
   (autoload 'gnus "gnus" nil t)
   (autoload 'vm-mail "vm-startup" nil t)
   (autoload 'mew-send "mew" nil t)
+  (autoload 'wl-draft "wl-draft" nil t)
   (autoload 'mh-smail "mh-comp" nil t)
   (autoload 'rmail-mail "rmail" nil t)
   (autoload 'mail-to "sendmail" nil t)
 (defcustom mozmail-default-mua gnus
   "*The default \(X\)Emacs mailer to use.
 
-Valid symbols are: gnus, vm, mhe, mew, rmail, emacs.
+Valid symbols are: gnus, vm, mhe, mew, wanderlust, rmail, emacs.
 
 CAUTION: If you wish to set this variable outside of the custom
 interface, you MUST set it via `customize-set-variable'.
 		 (const :tag "VM" :value vm)
 		 (const :tag "MH-E" :value mhe)
 		 (const :tag "MEW" :value mew)
+		 (const :tag "Wanderlust" :value wanderlust)
 		 (const :tag "RMail" :value rmail)
 		 (const :tag "Emacs Mail" :value emacs))
   :require 'mozmail
 			(vm 'vm)
 			(mhe 'mhe)
 			(mew 'mew)
+			(wanderlust 'wanderlust)
 			(rmail 'rmail)
 			(emacs 'emacs))
 		    (custom-initialize-default symbol value)
   (mew-send)
   (mozmail-populate-headers to subject cc bcc body))
 
+(defun mozmail-compose-wanderlust (to &optional subject cc bcc body)
+  "Compose a mail in Wanderlust from a Mozilla mailto link.
+
+Argument TO is the receipient of the mail.
+Optional argument SUBJECT is the mail's subject.
+Optional argument CC - carbon copy.
+Optional argument BCC - blind carbon copy.
+Optional argument BODY - text that will appear in the body of the
+mail."
+  (wl-draft)
+  (mozmail-populate-headers to subject cc bcc body))
+
 (defun mozmail-compose-emacs (to &optional subject cc bcc body)
   "Compose a mail in Emacs from a Mozilla mailto link.
 
 	   (when url
 	     (setq url (mozmail-split-string (car url) ?&))
 	     (while url
-	       (when (string= "subject=" (substring (car url) 0 8))
+	       (when (string= "subject=" (downcase (substring (car url) 0 8)))
 		 (setq value (substring (car url) 8)))
 	       (setq url (cdr url)))))
 	  ((eq sym 'cc)
 	   (when url
 	     (setq url (mozmail-split-string (car url) ?&))
 	     (while url
-	       (when (string= "cc=" (substring (car url) 0 3))
+	       (when (string= "cc=" (downcase (substring (car url) 0 3)))
 		 (setq value (substring (car url) 3)))
 	       (setq url (cdr url)))))
 	  ((eq sym 'bcc)
 	   (when url
 	     (setq url (mozmail-split-string (car url) ?&))
 	     (while url
-	       (when (string= "bcc=" (substring (car url) 0 4))
+	       (when (string= "bcc=" (downcase (substring (car url) 0 4)))
 		 (setq value (substring (car url) 4)))
 	       (setq url (cdr url)))))
 	  ((eq sym 'body)
 	   (when url
 	     (setq url (mozmail-split-string (car url) ?&))
 	     (while url
-	       (when (string= "body=" (substring (car url) 0 5))
+	       (when (string= "body=" (downcase (substring (car url) 0 5)))
 		 (setq value (substring (car url) 5)))
 	       (setq url (cdr url)))))
 	  (t