From 8eee3df112eedb8ab939cecc80888188c8879e04 Mon Sep 17 00:00:00 2001 From: teranisi Date: Mon, 30 Oct 2000 03:48:45 +0000 Subject: [PATCH] * wl-address.el (wl-ldap-alias-safe-string): Replace '@' to '/' in email address. --- wl/ChangeLog | 5 +++++ wl/wl-address.el | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) 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) -- 1.7.10.4