From fb7d107910653af2642dd7b5107573b7371a3113 Mon Sep 17 00:00:00 2001 From: teranisi Date: Tue, 23 Jan 2001 09:10:03 +0000 Subject: [PATCH] * Synch up with wl-2_4 and merged following changes. 2001-01-23 YAMASHITA Junji * utils/bbdb-wl.el (toplevel): commented out dummy function. (bbdb-wl-extract-field-value-internal): Renamed from `bbdb-extract-field-value-internal'. (toplevel): Fixed load order of bbdb-hooks.el for recent bbdb. 2001-01-22 YAMASHITA Junji * utils/bbdb-wl.el (bbdb-wl-get-petname): New function. 2001-01-22 YAMASHITA Junji * wl-summary.el (wl-summary-get-petname-func): New variable. (wl-summary-default-from): funcall `wl-summary-get-petname-func' instead of `wl-address-get-petname-1'. (wl-summary-simple-from): Ditto. * wl-address.el (wl-address-get-petname-1): Define as function. --- utils/bbdb-wl.el | 29 +++++++++++++++++++---------- wl/ChangeLog | 25 +++++++++++++++++++++++++ wl/wl-address.el | 2 +- wl/wl-draft.el | 48 +++++++++++++++--------------------------------- wl/wl-expire.el | 8 ++++++-- wl/wl-summary.el | 8 +++++--- 6 files changed, 71 insertions(+), 49 deletions(-) diff --git a/utils/bbdb-wl.el b/utils/bbdb-wl.el index 197cfe8..803b659 100644 --- a/utils/bbdb-wl.el +++ b/utils/bbdb-wl.el @@ -25,9 +25,9 @@ (require 'wl-message) (require 'wl-draft) (require 'wl-address) - (defvar bbdb-pop-up-elided-display nil) - (or (fboundp 'bbdb-extract-field-value-internal) - (defun bbdb-extract-field-value-internal (field)))) + (defvar bbdb-pop-up-elided-display nil)) +;; (or (fboundp 'bbdb-wl-extract-field-value-internal) +;; (defun bbdb-wl-extract-field-value-internal (field)))) (defvar bbdb-wl-get-update-record-hook nil) @@ -98,6 +98,14 @@ (let ((pop-up-windows nil)) (switch-to-buffer (get-buffer-create bbdb-buffer-name))))))) +(defun bbdb-wl-get-petname (from) + "For `wl-summary-get-petname-func'." + (let* ((address (wl-address-header-extract-address from)) + (record (bbdb-search-simple nil address))) + (and record + (or (bbdb-record-name record) + (car (bbdb-record-name record)))))) + (defun bbdb-wl-from-func (string) "A candidate From field STRING. For `wl-summary-from-func'." (let ((hit (bbdb-search-simple nil (wl-address-header-extract-address @@ -249,20 +257,21 @@ displaying the record corresponding to the sender of the current message." ;;; @ bbdb-extract-field-value -- stolen from tm-bbdb. ;;; -(and (not (fboundp 'bbdb-extract-field-value-internal)) +(and (not (fboundp 'bbdb-wl-extract-field-value-internal)) ;;; (not (fboundp 'PLEASE_REPLACE_WITH_SEMI-BASED_MIME-BBDB)) ;; mime-bbdb (progn -;;; (require 'bbdb-hooks) ; not provided. -;;; (or (fboundp 'bbdb-extract-field-value) ; defined as autoload - (or (fboundp 'bbdb-header-start) - (load "bbdb-hooks")) - (fset 'bbdb-extract-field-value-internal + (if (and (string< bbdb-version "1.58") + ;; (not (fboundp 'bbdb-extract-field-value) ; defined as autoload + (not (fboundp 'bbdb-header-start))) + (load "bbdb-hooks") + (require 'bbdb-hooks)) + (fset 'bbdb-wl-extract-field-value-internal (cond ((fboundp 'tm:bbdb-extract-field-value) (symbol-function 'tm:bbdb-extract-field-value)) (t (symbol-function 'bbdb-extract-field-value)))) (defun bbdb-extract-field-value (field) - (let ((value (bbdb-extract-field-value-internal field))) + (let ((value (bbdb-wl-extract-field-value-internal field))) (with-temp-buffer ; to keep raw buffer unibyte. (elmo-set-buffer-multibyte default-enable-multibyte-characters) diff --git a/wl/ChangeLog b/wl/ChangeLog index 15c4c8e..cb1d2b5 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,28 @@ +2001-01-22 YAMASHITA Junji + + * wl-summary.el (wl-summary-get-petname-func): New variable. + (wl-summary-default-from): funcall `wl-summary-get-petname-func' + instead of `wl-address-get-petname-1'. + (wl-summary-simple-from): Ditto. + + * wl-address.el (wl-address-get-petname-1): Define as function. + +2001-01-22 Yuuichi Teranishi + + * wl-draft.el (wl-draft-reply): Fixed problem when there's no subject + field in the original message. + (Pointed out by "HIROSE, Masaaki" ) + +2001-01-19 Akihiro MOTOKI + + * wl-expire.el (wl-expire-hide): + Call `wl-expire-delete-reserve-marked-msgs-from-list'. + +2001-01-19 Yuuichi Teranishi + + * wl-draft.el (wl-draft-reply): Use `mime-find-field-decoder' to + find decoder for To, Cc, and Subject. + 2001-01-18 Yuuichi Teranishi * Version number is increased to 2.5.5. diff --git a/wl/wl-address.el b/wl/wl-address.el index 5581fc8..259ae2b 100644 --- a/wl/wl-address.el +++ b/wl/wl-address.el @@ -549,7 +549,7 @@ Refresh `wl-address-list', `wl-address-completion-list', and (forward-line)) ret)))) -(defsubst wl-address-get-petname-1 (string) +(defun wl-address-get-petname-1 (string) (let ((address (downcase (wl-address-header-extract-address string)))) (elmo-get-hash-val address wl-address-petname-hash))) diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 1181f87..e97c8ff 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -271,17 +271,8 @@ Return symbol, not list. Use symbol-name" "" ;;;(save-excursion (let (r-list - (mime-header-lexical-analyzer '(eword-analyze-quoted-string - eword-analyze-domain-literal - eword-analyze-comment - eword-analyze-spaces - eword-analyze-special - eword-analyze-encoded-word - eword-analyze-atom)) - eword-lexical-analyzer to mail-followup-to cc subject in-reply-to references newsgroups - from to-alist cc-alist r-list-name) - (setq eword-lexical-analyzer mime-header-lexical-analyzer) + from to-alist cc-alist r-list-name decoder) (set-buffer buf) (setq from (wl-address-header-extract-address (std11-field-body "From"))) ;; symbol-name use in error message @@ -328,36 +319,27 @@ Return symbol, not list. Use symbol-name" cc (wl-parse-addresses cc)) (with-temp-buffer ; to keep raw buffer unibyte. (elmo-set-buffer-multibyte default-enable-multibyte-characters) - (setq subject (or (and subject - (eword-decode-string - (decode-mime-charset-string - subject - wl-mime-charset))))) + (setq decoder (mime-find-field-decoder 'Subject 'plain)) + (setq subject (if (and subject decoder) + (funcall decoder subject) subject)) (setq to-alist (mapcar - '(lambda (addr) - (setq addr (eword-extract-address-components addr)) - (cons (nth 1 addr) - (if (nth 0 addr) - (concat - (wl-address-quote-specials (nth 0 addr)) - " <" (nth 1 addr) ">") - (nth 1 addr)))) + (lambda (addr) + (setq decoder (mime-find-field-decoder 'To 'plain)) + (cons (nth 1 (std11-extract-address-components addr)) + (if decoder (funcall decoder addr) addr))) to)) (setq cc-alist (mapcar - '(lambda (addr) - (setq addr (eword-extract-address-components addr)) - (cons (nth 1 addr) - (if (nth 0 addr) - (concat - (wl-address-quote-specials (nth 0 addr)) - " <" (nth 1 addr) ">") - (nth 1 addr)))) + (lambda (addr) + (setq decoder (mime-find-field-decoder 'Cc 'plain)) + (cons (nth 1 (std11-extract-address-components addr)) + (if decoder (funcall decoder addr) addr))) cc))) - (and subject wl-reply-subject-prefix + (and wl-reply-subject-prefix (setq subject (concat wl-reply-subject-prefix - (wl-draft-strip-subject-re subject)))) + (wl-draft-strip-subject-re + (or subject ""))))) (setq in-reply-to (std11-field-body "Message-Id")) (setq references (nconc (std11-field-bodies '("References" "In-Reply-To")) diff --git a/wl/wl-expire.el b/wl/wl-expire.el index e2648a8..178dab0 100644 --- a/wl/wl-expire.el +++ b/wl/wl-expire.el @@ -465,8 +465,12 @@ Refile to archive folder followed message date." deleted-list )) -(defun wl-expire-hide (folder hide-list msgdb) - "" +(defun wl-expire-hide (folder hide-list msgdb &optional no-reserve-marks) + "Hide message for expire." + (unless no-reserve-marks + (setq hide-list + (wl-expire-delete-reserve-marked-msgs-from-list + hide-list (elmo-msgdb-get-mark-alist msgdb)))) (let ((mess (format "Hiding %s msgs..." (length hide-list)))) (message mess) (elmo-msgdb-delete-msgs folder hide-list msgdb t) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index b84664c..ca55875 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -111,6 +111,8 @@ (defvar wl-summary-search-buf-name " *wl-search-subject*") (defvar wl-summary-delayed-update nil) +(defvar wl-summary-get-petname-func 'wl-address-get-petname-1) + (defvar wl-summary-message-regexp "^ *\\([0-9]+\\)") (defvar wl-summary-shell-command-last "") @@ -205,7 +207,7 @@ (eword-decode-string (if wl-use-petname (or - (wl-address-get-petname-1 to) + (funcall wl-summary-get-petname-func to) (car (std11-extract-address-components to)) to) @@ -216,7 +218,7 @@ entity "newsgroups")) (setq retval (concat "Ng:" ng))))) (if wl-use-petname - (setq retval (or (wl-address-get-petname-1 from) + (setq retval (or (funcall wl-summary-get-petname-func from) (car (std11-extract-address-components from)) from)) (setq retval from))) @@ -224,7 +226,7 @@ (defun wl-summary-simple-from (string) (if wl-use-petname - (or (wl-address-get-petname-1 string) + (or (funcall wl-summary-get-petname-func string) (car (std11-extract-address-components string)) string) string)) -- 1.7.10.4