From: teranisi Date: Mon, 30 Oct 2000 03:48:45 +0000 (+0000) Subject: * wl-address.el (wl-ldap-alias-safe-string): Replace '@' to '/' X-Git-Tag: wl-2_4-root~52 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=8eee3df112eedb8ab939cecc80888188c8879e04;p=elisp%2Fwanderlust.git * wl-address.el (wl-ldap-alias-safe-string): Replace '@' to '/' in email address. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 83bd518..b71045a 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2000-10-30 Yuuichi Teranishi + + * wl-address.el (wl-ldap-alias-safe-string): Replace '@' to '/' + in email address. + 2000-10-07 Yasushi Shoji * wl-vars.el (wl-subject-prefix-regexp): New variable. diff --git a/wl/wl-address.el b/wl/wl-address.el index b0a27b8..178619b 100644 --- a/wl/wl-address.el +++ b/wl/wl-address.el @@ -130,14 +130,15 @@ Returns matched uniq string list." (defun wl-ldap-alias-safe-string (str) "Modify STR for alias. Replace space/tab in STR into '_' char. -And remove domain part of mail addr." +Replace '@' in STR into '/' char." (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 0)) - (substring str (match-end 0))))) + (if (string-match "\\(@\\)[^/@]+" str) + (setq str (concat (substring str 0 (match-beginning 1)) + "/" + (substring str (match-end 1))))) str) (defun wl-ldap-register-dn-string (hash dn &optional str dn-list)