2000-11-01 Yuuichi Teranishi <teranisi@gohome.org>
+ * 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 <yuuji@gentei.org>)
(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))))
(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)
(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))