From 5a954fe4158278866dd1c6b07e8b0ee39653c54c Mon Sep 17 00:00:00 2001 From: teranisi Date: Thu, 20 Sep 2001 03:55:47 +0000 Subject: [PATCH] * wl.el (wl-check-environment): Undo last change. * wl-vars.el (wl-from): Changed default value. * wl-util.el (toplevel): Don't require tm-edit. * wl-draft.el (wl-draft): Changed order of `elmo-init' and `wl-folder-init'; Don't set mark on mail body. (wl-draft-reedit): Ditto. * wl-address.el (wl-address-quote-specials): Define as an alias for elmo-address-quote-specials. * elmo-util.el (elmo-address-quote-specials): New function; Renamed from `wl-address-quote-specials'. --- elmo/ChangeLog | 5 +++++ elmo/elmo-util.el | 8 ++++++++ wl/ChangeLog | 16 ++++++++++++++++ wl/wl-address.el | 8 +------- wl/wl-draft.el | 8 +++----- wl/wl-util.el | 1 - wl/wl-vars.el | 10 +++++++--- wl/wl.el | 5 +---- 8 files changed, 41 insertions(+), 20 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 9f67051..db107b6 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2001-09-20 Yuuichi Teranishi + + * elmo-util.el (elmo-address-quote-specials): New function; + Renamed from `wl-address-quote-specials'. + 2001-09-18 TAKAHASHI Kaoru * elmo-version.el (elmo-version): Up to 2.7.4. diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index c962194..a35a28a 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -1173,6 +1173,14 @@ the value of `foo'." (defalias 'elmo-field-body 'std11-fetch-field) ;;no narrow-to-region (defalias 'elmo-field-body 'std11-field-body)) +(defun elmo-address-quote-specials (word) + "Make quoted string of WORD if needed." + (let ((lal (std11-lexical-analyze word))) + (if (or (assq 'specials lal) + (assq 'domain-literal lal)) + (prin1-to-string word) + word))) + (defmacro elmo-string (string) "STRING without text property." (` (let ((obj (copy-sequence (, string)))) diff --git a/wl/ChangeLog b/wl/ChangeLog index 39bbc7b..483ba8c 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,19 @@ +2001-09-20 Yuuichi Teranishi + + * wl.el (wl-check-environment): Undo last change. + + * wl-vars.el (wl-from): Changed default value. + + * wl-util.el (toplevel): Don't require tm-edit. + + * wl-draft.el (wl-draft): Changed order of `elmo-init' and + `wl-folder-init'; + Don't set mark on mail body. + (wl-draft-reedit): Ditto. + + * wl-address.el (wl-address-quote-specials): Define as an alias for + elmo-address-quote-specials. + 2001-09-18 Yuuichi Teranishi * wl.el (wl-check-environment): If `wl-from' is nil, use default value. diff --git a/wl/wl-address.el b/wl/wl-address.el index 3e540c6..f5cf124 100644 --- a/wl/wl-address.el +++ b/wl/wl-address.el @@ -280,13 +280,7 @@ Matched address lists are append to CL." (completing-read "To: " cl) (read-string "To: ")))) -(defun wl-address-quote-specials (word) - "Make quoted string of WORD if needed." - (let ((lal (std11-lexical-analyze word))) - (if (or (assq 'specials lal) - (assq 'domain-literal lal)) - (prin1-to-string word) - word))) +(defalias 'wl-address-quote-specials 'elmo-address-quote-specials) (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 1e43ff7..987badb 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1316,9 +1316,9 @@ If optional argument is non-nil, current draft buffer is killed" (require 'wl)) (unless wl-init (wl-load-profile) - (elmo-init) - (wl-folder-init)) - (wl-init) ;; returns immediately if already initialized. + (wl-folder-init) + (elmo-init)) + (wl-init) ; returns immediately if already initialized. (if (interactive-p) (setq summary-buf (wl-summary-get-buffer (wl-summary-buffer-folder-name)))) (let ((draft-folder (wl-folder-get-elmo-folder wl-draft-folder)) @@ -1410,7 +1410,6 @@ If optional argument is non-nil, current draft buffer is killed" (1- (point))) 'category 'mail-header-separator) (and body (insert body))) - (push-mark (point) t t) (as-binary-output-file (write-region (point-min)(point-max) wl-draft-buffer-file-name nil t)) @@ -1510,7 +1509,6 @@ If optional argument is non-nil, current draft buffer is killed" (goto-char (point-min)) (or (re-search-forward "\n\n" nil t) (search-forward (concat mail-header-separator "\n") nil t)) - (push-mark (point) t t) (write-region (point-min)(point-max) wl-draft-buffer-file-name nil t) (wl-draft-overload-functions) diff --git a/wl/wl-util.el b/wl/wl-util.el index 4556c9a..3a288af 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -36,7 +36,6 @@ (eval-when-compile (require 'elmo-util)) -(condition-case nil (require 'tm-edit) (error nil)) (condition-case nil (require 'pp) (error nil)) (eval-when-compile diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 457fc7b..b224d0d 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -131,10 +131,14 @@ (defvar wl-use-semi (module-installed-p 'mime-view) ; If nil, use tm. "*Use SEMI or not.") -(defcustom wl-from nil +(defcustom wl-from (and user-mail-address + (concat (and user-full-name + (concat (elmo-address-quote-specials + user-full-name) + " ")) + "<" user-mail-address ">")) "*From string used in draft." - :type '(choice (const :tag "Use default value" nil) - string) + :type 'string :group 'wl :group 'wl-setting) diff --git a/wl/wl.el b/wl/wl.el index 48dc2cb..b78eceb 100644 --- a/wl/wl.el +++ b/wl/wl.el @@ -690,10 +690,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (run-hooks 'wl-init-hook))) (defun wl-check-environment (no-check-folder) - (unless wl-from - (setq wl-from - (concat (wl-address-quote-specials (user-full-name)) - " <" user-mail-address ">"))) + (unless wl-from (error "Please set `wl-from'")) ;; Message-ID (unless (string-match "[^.]\\.[^.]" (or wl-message-id-domain (if wl-local-domain -- 1.7.10.4