From: teranisi Date: Thu, 30 May 2002 04:50:56 +0000 (+0000) Subject: * bbdb-wl.el (bbdb-wl-canonicalize-full-name-function): New variable. X-Git-Tag: elmo-mark-root~96 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4721180044edbcb5f9d6816e56e6800f3a434206;p=elisp%2Fwanderlust.git * bbdb-wl.el (bbdb-wl-canonicalize-full-name-function): New variable. (bbdb-wl-canonicalize-spaces-and-dots): New function. (bbdb-wl-get-addresses-1): Use bbdb-wl-canonicalize-full-name-function. (bbdb-wl-get-addresses-2): Ditto. --- diff --git a/utils/ChangeLog b/utils/ChangeLog index 8b7fb9f..1e064f3 100644 --- a/utils/ChangeLog +++ b/utils/ChangeLog @@ -1,3 +1,10 @@ +2002-05-30 Yuuichi Teranishi + + * bbdb-wl.el (bbdb-wl-canonicalize-full-name-function): New variable. + (bbdb-wl-canonicalize-spaces-and-dots): New function. + (bbdb-wl-get-addresses-1): Use bbdb-wl-canonicalize-full-name-function. + (bbdb-wl-get-addresses-2): Ditto. + 2002-05-20 Yoichi NAKAYAMA * im-wl.el: wl-draft-send-func -> wl-draft-send-function diff --git a/utils/bbdb-wl.el b/utils/bbdb-wl.el index 10e73a7..e225495 100644 --- a/utils/bbdb-wl.el +++ b/utils/bbdb-wl.el @@ -33,6 +33,15 @@ (defvar bbdb-wl-folder-regexp nil) (defvar bbdb-wl-ignore-folder-regexp nil) +(defvar bbdb-wl-canonicalize-full-name-function + #'bbdb-wl-canonicalize-spaces-and-dots + "Way to canonicalize full name.") + +(defun bbdb-wl-canonicalize-spaces-and-dots (string) + (while (string-match " +\\|[\f\t\n\r\v]+\\|\\." string) + (setq string (replace-match " " nil t string))) + string) + ;;;###autoload (defun bbdb-wl-setup () (add-hook 'wl-message-redisplay-hook 'bbdb-wl-get-update-record) @@ -168,7 +177,8 @@ For BBDB 2.33 or earlier." (std11-unfold-string header))) (while (and (setq structure (car structures)) (eq (car structure) 'mailbox)) - (setq fn (std11-full-name-string structure) + (setq fn (funcall bbdb-wl-canonicalize-full-name-function + (std11-full-name-string structure)) fn (and fn (with-temp-buffer ; to keep raw buffer unibyte. (elmo-set-buffer-multibyte @@ -212,7 +222,8 @@ For BBDB 2.34 or later." (std11-unfold-string header-content))) (while (and (setq structure (car structures)) (eq (car structure) 'mailbox)) - (setq fn (std11-full-name-string structure) + (setq fn (funcall bbdb-wl-canonicalize-full-name-function + (std11-full-name-string structure)) fn (and fn (with-temp-buffer ; to keep raw buffer unibyte. (elmo-set-buffer-multibyte