From 251c8c4d50e52405f33cfbb5a3f509376052038b Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sat, 24 Jun 2023 11:50:19 +1000 Subject: Make bbdb gnus integration usable --- emacs/.emacs.d/lisp/my/my-bbdb.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'emacs/.emacs.d/lisp/my/my-bbdb.el') 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 -- cgit v1.2.3