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

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

[elpa] externals/org-contacts b34f505d38 042/154: contrib/lisp/org-conta


From: ELPA Syncer
Subject: [elpa] externals/org-contacts b34f505d38 042/154: contrib/lisp/org-contacts.el (org-contacts-complete-name): Prevent an error when there is no completion available
Date: Fri, 9 Sep 2022 15:58:24 -0400 (EDT)

branch: externals/org-contacts
commit b34f505d381bec49f795c9dd83316e370968cf64
Author: Grégoire Jadi <gregoire.jadi@gmail.com>
Commit: Grégoire Jadi <gregoire.jadi@gmail.com>

    contrib/lisp/org-contacts.el (org-contacts-complete-name): Prevent an error 
when there is no completion available
    
    * contrib/lisp/org-contacts.el (org-contacts-complete-name): Compute the
    completion-list a bit earlier to prevent an error when there is no
    completion available.
---
 org-contacts.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/org-contacts.el b/org-contacts.el
index 9045087ea4..4ffe36001c 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -439,13 +439,13 @@ A group FOO is composed of contacts with the tag FOO."
                if email-list
                ;; … append a list of USER <EMAIL>.
                nconc (loop for email in email-list
-                           collect (org-contacts-format-email contact-name 
email)))))
+                           collect (org-contacts-format-email contact-name 
email))))
+        (completion-list (org-contacts-all-completions-prefix
+                          string
+                          (remove-duplicates completion-list :test #'equalp))))
     (when completion-list
       (list start end
-           (org-contacts-make-collection-prefix
-            (org-contacts-all-completions-prefix
-             string
-             (remove-duplicates completion-list :test #'equalp)))))))
+           (org-contacts-make-collection-prefix completion-list)))))
 
 (defun org-contacts-message-complete-function (&optional start)
   "Function used in `completion-at-point-functions' in `message-mode'."



reply via email to

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