From e0194cb3a33f7a5529f47b615d280aae4b100135 Mon Sep 17 00:00:00 2001 From: teranisi Date: Wed, 1 Nov 2000 03:05:39 +0000 Subject: [PATCH] * 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/ChangeLog | 4 ++++ wl/wl-address.el | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) 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)) -- 1.7.10.4