emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb 1ba8d3b 4/6: Improvements to message annotation


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 1ba8d3b 4/6: Improvements to message annotation
Date: Thu, 7 Nov 2019 18:12:42 -0500 (EST)

branch: externals/ebdb
commit 1ba8d3b6661584e08ad3c4e36c6ab56bbf54e6e1
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Improvements to message annotation
    
    * ebdb-mua.el (ebdb-annotate-message): Hadn't got this logic quite
    right before: if mail is identical to name, it should be forcibly set
    to nil. Then use ebdb-parse to create the mail, if it exists, and bail
    on the whole process if it doesn't.
---
 ebdb-mua.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/ebdb-mua.el b/ebdb-mua.el
index f6ff490..2ec5ca3 100644
--- a/ebdb-mua.el
+++ b/ebdb-mua.el
@@ -920,12 +920,13 @@ Return the records matching ADDRESS or nil."
           (records (ebdb-message-search
                    name
                    ;; If `mail-extract-address-components' can't find
-                   ;; a mail addres it returns two identical strings
+                   ;; a mail address it returns two identical strings
                    ;; (the name), I don't know why.  But when it
                    ;; does, EBDB assumes the string is a valid mail
                    ;; address and tries to find/add it.
-                   (unless (string= mail name)
-                     mail)))
+                   (setq mail
+                         (unless (string= mail name)
+                           mail))))
           created-p new-records)
       (if (and (not records) (functionp update-p))
           (setq update-p (funcall update-p)))
@@ -1028,7 +1029,7 @@ Return the records matching ADDRESS or nil."
                                ebdb-silent
                                (y-or-n-p (format "Ignore redundant mail %s? " 
mail)))
                            (setq mail redundant))))))
-         (setq mail (make-instance ebdb-default-mail-class :mail mail))
+         (setq mail (ignore-errors (ebdb-parse ebdb-default-mail-class mail)))
           ;; Analyze the mail part of the new records
           (cond ((or (not mail) (equal (ebdb-string mail) "???")
                      (member-ignore-case (ebdb-string mail) 
(ebdb-record-mail-canon record)))) ; do nothing



reply via email to

[Prev in Thread] Current Thread [Next in Thread]