aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/lisp/my')
-rw-r--r--emacs/.emacs.d/lisp/my/my-bbdb.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-bbdb.el b/emacs/.emacs.d/lisp/my/my-bbdb.el
index 80661cd..f5aa420 100644
--- a/emacs/.emacs.d/lisp/my/my-bbdb.el
+++ b/emacs/.emacs.d/lisp/my/my-bbdb.el
@@ -186,5 +186,12 @@ If NAME exists in bbdb, update. Otherwise insert."
(interactive)
(bbdb ""))
+(defun my-bbdb-clean-mail (address)
+ "Cleans email address."
+ (setq address (bbdb-string-trim address))
+ (cond ((string-match "\\`\\([^@+]+\\)\\+[^@]+\\(@.*\\)\\'" address)
+ (concat (match-string 1 address) (match-string 2 address)))
+ (t address)))
+
(provide 'my-bbdb)
;;; my-bbdb.el ends here