[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-contacts 6723942283 048/154: contrib/lisp/org-conta
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-contacts 6723942283 048/154: contrib/lisp/org-contacts.el: Remove calls to cl functions |
Date: |
Fri, 9 Sep 2022 15:58:25 -0400 (EDT) |
branch: externals/org-contacts
commit 67239422833614a0b87bc770d08787cadb25ee5d
Author: Grégoire Jadi <gregoire.jadi@gmail.com>
Commit: Grégoire Jadi <gregoire.jadi@gmail.com>
contrib/lisp/org-contacts.el: Remove calls to cl functions
* contrib/lisp/org-contacts.el(org-contacts-test-completion-prefix)
(org-contacts-complete-name, org-contacts-db-need-update-p)
(org-contacts-filter): Remove calls to cl functions.
---
org-contacts.el | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/org-contacts.el b/org-contacts.el
index 65afe731e4..0c5a9cf6e0 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -165,10 +165,10 @@ This overrides `org-email-link-description-format' if
set."
(defun org-contacts-db-need-update-p ()
"Determine whether `org-contacts-db' needs to be refreshed."
(or (null org-contacts-last-update)
- (some (lambda (file)
- (or (time-less-p org-contacts-last-update
- (elt (file-attributes file) 5))))
- (org-contacts-files))))
+ (org-find-if (lambda (file)
+ (or (time-less-p org-contacts-last-update
+ (elt (file-attributes file) 5))))
+ (org-contacts-files))))
(defun org-contacts-db ()
"Return the latest Org Contacts Database."
@@ -207,10 +207,10 @@ If both match values are nil, return all contacts."
(org-string-match-p name-match
(first contact)))
(and tags-match
- (some (lambda (tag)
- (org-string-match-p tags-match tag))
- (org-split-string
- (or (cdr (assoc-string "ALLTAGS" (caddr contact)))
"") ":"))))
+ (org-find-if (lambda (tag)
+ (org-string-match-p tags-match tag))
+ (org-split-string
+ (or (cdr (assoc-string "ALLTAGS" (caddr
contact))) "") ":"))))
collect contact)))
(when (not (fboundp 'completion-table-case-fold))
@@ -369,10 +369,13 @@ prefixes rather than just the beginning of the string."
completions))
(defun org-contacts-test-completion-prefix (string collection predicate)
- (find-if (lambda (el)
- (and (or (null predicate) (funcall predicate el))
- (string= string el)))
- collection))
+ ;; Prevents `org-find-if' from redefining `predicate' and going into
+ ;; an infinite loop.
+ (lexical-let ((predicate predicate))
+ (org-find-if (lambda (el)
+ (and (or (null predicate) (funcall predicate el))
+ (string= string el)))
+ collection)))
(defun org-contacts-boundaries-prefix (string collection predicate suffix)
(list* 'boundaries (completion-boundaries string collection predicate
suffix)))
@@ -444,7 +447,7 @@ A group FOO is composed of contacts with the tag FOO."
collect (org-contacts-format-email contact-name
email))))
(completion-list (org-contacts-all-completions-prefix
string
- (remove-duplicates completion-list :test #'equalp))))
+ (org-uniquify completion-list))))
(when completion-list
(list start end
(org-contacts-make-collection-prefix completion-list)))))
- [elpa] externals/org-contacts ad99d80ad3 001/154: org-contacts: import, (continued)
- [elpa] externals/org-contacts ad99d80ad3 001/154: org-contacts: import, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts e585be0859 009/154: org-contacts: added org-contacts-show-map (requires google-maps-el), ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 5f1806a8d0 012/154: org-contacts: fix errors when Gnus or ERC are not loaded, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts c297cb009f 020/154: Merge branch 'maint', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 1b6cff5ac7 026/154: contrib/lisp/org-contacts.el: Fix indentation of the file, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 8bf8565c46 027/154: Update copyright years., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts fb5c9dcec9 043/154: orgcontacts.el: Fix `date' being broken in `org-contacts-anniversaries'., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts dcd313e66d 021/154: Tags/properties matcher: Fixed issues with todo-only matches, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 72d2cafa36 022/154: add a missing require for gnus-util, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 4b368d7709 045/154: Fix typo., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 6723942283 048/154: contrib/lisp/org-contacts.el: Remove calls to cl functions,
ELPA Syncer <=
- [elpa] externals/org-contacts 1d70236144 054/154: org-contacts.el (org-contacts-matcher): Better matcher, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 1b44df7267 058/154: contrib/lisp/org-contacts: Allow org links in properties, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 43d6571612 061/154: org-contacts: Fix org-contacts-gnus-article-from-goto, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts a3c24bc7c8 063/154: contrib/lisp/org-contacts.el (org-contacts-vcard-format): Silence byte-compiler, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts e6b5811004 064/154: contrib/lisp/org-contacts.el: Add a feature, which can ignore emails or phones with property, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts fa4869123d 065/154: contrib/lisp/org-contacts.el: Various formatting improvements and bug fixes, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 25211e8066 068/154: org-contacts: Ensure contacts cache is updated if it contains markers with no buffer, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts dcd8af90c9 028/154: Merge branch 'maint', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts ad7f57a603 023/154: Fix error messages: don't use a dot at the end, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 81129c4c07 046/154: org-contacts.el: Fix or add docstrings, ELPA Syncer, 2022/09/09