(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)
(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
;;; @ 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)
+2001-01-22 YAMASHITA Junji <ysjj@unixuser.org>
+
+ * 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 <teranisi@gohome.org>
+
+ * wl-draft.el (wl-draft-reply): Fixed problem when there's no subject
+ field in the original message.
+ (Pointed out by "HIROSE, Masaaki" <hirose31@t3.rim.or.jp>)
+
+2001-01-19 Akihiro MOTOKI <mokkun@iname.com>
+
+ * wl-expire.el (wl-expire-hide):
+ Call `wl-expire-delete-reserve-marked-msgs-from-list'.
+
+2001-01-19 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * wl-draft.el (wl-draft-reply): Use `mime-find-field-decoder' to
+ find decoder for To, Cc, and Subject.
+
2001-01-18 Yuuichi Teranishi <teranisi@gohome.org>
* Version number is increased to 2.5.5.
(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)))
""
;;;(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
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"))
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)
(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 "")
(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)
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)))
(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))