aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my/my-bbdb.el
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-06-24 11:50:19 +1000
committerYuchen Pei <id@ypei.org>2023-06-24 11:50:19 +1000
commit251c8c4d50e52405f33cfbb5a3f509376052038b (patch)
tree6fc535356075c17ff3206170488e497634e93f9d /emacs/.emacs.d/lisp/my/my-bbdb.el
parent49f5687a76f51737b95b5c9fffc1f73f2e8da1e8 (diff)
Make bbdb gnus integration usable
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-bbdb.el')
-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