From: teranisi Date: Tue, 18 Sep 2001 07:29:49 +0000 (+0000) Subject: * wl.el (wl-check-environment): If `wl-from' is nil, use default value. X-Git-Tag: wl-2_6_1~36 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=442333b8d763b73d3b738558fe2faddaf995cff9;p=elisp%2Fwanderlust.git * wl.el (wl-check-environment): If `wl-from' is nil, use default value. * wl-vars.el (wl-from): Set default value as nil. (wl-organization): Sed default value as ORGANIZATION environment variable. * wl-draft.el (wl-smtp-extension-bind): Check value of wl-smtp-connection-type. * wl-address.el (wl-address-specials-regexp): Eliminated. (wl-address-quote-specials): Rewrite. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index d5e6a21..81a3876 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,17 @@ +2001-09-18 Yuuichi Teranishi + + * wl.el (wl-check-environment): If `wl-from' is nil, use default value. + + * wl-vars.el (wl-from): Set default value as nil. + (wl-organization): Sed default value as ORGANIZATION environment + variable. + + * wl-draft.el (wl-smtp-extension-bind): Check value of + wl-smtp-connection-type. + + * wl-address.el (wl-address-specials-regexp): Eliminated. + (wl-address-quote-specials): Rewrite. + 2001-09-17 Reuben Thomas * wl-addrmgr.el (wl-fldmgr-delete): Fix docstring. diff --git a/wl/wl-address.el b/wl/wl-address.el index 9d589f9..ce10c21 100644 --- a/wl/wl-address.el +++ b/wl/wl-address.el @@ -280,13 +280,13 @@ Matched address lists are append to CL." (completing-read "To: " cl) (read-string "To: ")))) -(defconst wl-address-specials-regexp "[]\"(),.:;<>@[\\]") - (defun wl-address-quote-specials (word) "Make quoted string of WORD if needed." - (if (string-match wl-address-specials-regexp word) - (prin1-to-string word) - word)) + (let ((lal (std11-lexical-analyze word))) + (if (or (assq 'specials lal) + (assq 'domain-literal lal)) + (prin1-to-string word) + word))) (defun wl-address-make-completion-list (address-list) (let (addr-tuple cl) diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 6d1f982..28d216b 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -100,7 +100,7 @@ wl-smtp-authenticate-type (list wl-smtp-authenticate-type))))) (smtp-use-sasl (and smtp-sasl-mechanisms t)) - (smtp-use-starttls wl-smtp-connection-type) + (smtp-use-starttls (eq wl-smtp-connection-type 'starttls)) smtp-sasl-user-name smtp-sasl-properties sasl-read-passphrase) (if (and (string= (car smtp-sasl-mechanisms) "DIGEST-MD5") ;; sendmail bug? diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 930f3b4..148e399 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -130,10 +130,10 @@ (defvar wl-use-semi (module-installed-p 'mime-view) ; If nil, use tm. "*Use SEMI or not.") -(defcustom wl-from (if (boundp 'user-mail-address) - user-mail-address) +(defcustom wl-from nil "*From string used in draft." - :type 'string + :type '(choice (const :tag "Use default value" nil) + string) :group 'wl) (defcustom wl-user-mail-address-list nil @@ -144,7 +144,7 @@ If you don't have multiple e-mail addresses, you don't have to set this." :type '(repeat string) :group 'wl) -(defcustom wl-organization nil +(defcustom wl-organization (getenv "ORGANIZATION") "Organization name." :type '(choice (const :tag "none" nil) string) diff --git a/wl/wl-version.el b/wl/wl-version.el index d4fc913..6ba85fd 100644 --- a/wl/wl-version.el +++ b/wl/wl-version.el @@ -46,7 +46,7 @@ "Wanderlust" nil (eval-when-compile (product-version (product-find 'elmo-version))) ; equals to ELMO version. - "Twist And Shout")) + "Upside Down")) ;; set version-string (product-version-as-string 'wl-version) diff --git a/wl/wl.el b/wl/wl.el index 1c6acd6..9259493 100644 --- a/wl/wl.el +++ b/wl/wl.el @@ -705,7 +705,9 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (unless (featurep 'mime-setup) (require 'mime-setup)) (unless wl-from - (error "Please set `wl-from'")) + (setq wl-from + (concat (wl-address-quote-specials (user-full-name)) + " <" user-mail-address ">"))) ;; Message-ID (unless (string-match "[^.]\\.[^.]" (or wl-message-id-domain (if wl-local-domain