From 3690368c9119a35d62afd69498fa9215d8a54560 Mon Sep 17 00:00:00 2001 Message-Id: <3690368c9119a35d62afd69498fa9215d8a54560.1717714996.git.mdw@distorted.org.uk> From: Mark Wooding Date: Thu, 24 Mar 2016 11:06:41 +0000 Subject: [PATCH] dot/emacs (bbdb-canonicalize-net-hook): Handle `nil' address. Organization: Straylight/Edgeware From: Mark Wooding It turns out that, despite the documentation not mentioning this at all, that the hook is allowed to return `nil' to suppress insertion of the address into the database at all. The only snag is that `nil' is /still/ sent back to the hook to check for convergence. So notice this and return `nil' back, since it's not like we're going to be able to turn it into anything more useful. --- dot/emacs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dot/emacs b/dot/emacs index 13ac888..afb08bd 100644 --- a/dot/emacs +++ b/dot/emacs @@ -211,7 +211,9 @@ "\\)$") bbdb-canonicalize-net-hook (lambda (addr) - (cond ((string-match (concat "^reply-[0-9a-f]+-[0-9a-f]+_" + (cond ((null addr) + nil) + ((string-match (concat "^reply-[0-9a-f]+-[0-9a-f]+_" "HTML-[0-9]+-[0-9]+-[0-9]+" "@\\(nationwide-communications\\.co\\.uk\\)") addr) -- [mdw]