From: teranisi Date: Wed, 1 Nov 2000 03:05:39 +0000 (+0000) Subject: * wl-address.el (wl-ldap-register-dn-string): Flatten dn-list. X-Git-Tag: wl-2_4-root~25 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=e0194cb3a33f7a5529f47b615d280aae4b100135;p=elisp%2Fwanderlust.git * wl-address.el (wl-ldap-register-dn-string): Flatten dn-list. (wl-ldap-make-matched-value-list): Ditto. (wl-ldap-alias-safe-string): Split e-mail address. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index ac184f0..9779f98 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,9 @@ 2000-11-01 Yuuichi Teranishi + * wl-address.el (wl-ldap-register-dn-string): Flatten dn-list. + (wl-ldap-make-matched-value-list): Ditto. + (wl-ldap-alias-safe-string): Split e-mail address. + * wl-summary.el (wl-summary-read-folder): Fixed problem when petname folder default was selected. (Fix by HIROSE Yuuji ) diff --git a/wl/wl-address.el b/wl/wl-address.el index ad5711a..8b30e56 100644 --- a/wl/wl-address.el +++ b/wl/wl-address.el @@ -119,6 +119,7 @@ Returns matched uniq string list." (setq type (car (car entry)) values (mapcar (function wl-ldap-alias-safe-string) (cdr (car entry))) + values (elmo-flatten values) entry (cdr entry)) (if (string-match "::?$" type) (setq type (substring type 0 (match-beginning 0)))) @@ -134,15 +135,13 @@ Returns matched uniq string list." (defun wl-ldap-alias-safe-string (str) "Modify STR for alias. Replace space/tab in STR into '_' char. -Replace '@' in STR into '/' char." +Replace '@' in STR into list of mailbox and sub-domains." (while (string-match "[^_a-zA-Z0-9+@%.!\\-/]+" str) (setq str (concat (substring str 0 (match-beginning 0)) "_" (substring str (match-end 0))))) (if (string-match "\\(@\\)[^/@]+" str) - (setq str (concat (substring str 0 (match-beginning 1)) - "/" - (substring str (match-end 1))))) + (setq str (split-string str "[@\\.]"))) str) (defun wl-ldap-register-dn-string (hash dn &optional str dn-list) @@ -158,7 +157,8 @@ Replace '@' in STR into '/' char." (if (string-match "[a-z]+=\\(.*\\)" str) (wl-ldap-alias-safe-string (wl-match-string 1 str)))) - (split-string dn ","))))) + (split-string dn "[ \t]*,[ \t]*"))))) + (setq dn-list (elmo-flatten dn-list)) ;; prepare candidate for uniq str (if str (setq str (concat str wl-ldap-alias-sep (car dn-list))