[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-contacts 81129c4c07 046/154: org-contacts.el: Fix o
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-contacts 81129c4c07 046/154: org-contacts.el: Fix or add docstrings |
Date: |
Fri, 9 Sep 2022 15:58:25 -0400 (EDT) |
branch: externals/org-contacts
commit 81129c4c07626c8f42026670b16d288b57c24fa0
Author: Bastien Guerry <bzg@altern.org>
Commit: Bastien Guerry <bzg@altern.org>
org-contacts.el: Fix or add docstrings
* org-contacts.el (org-contacts-db)
(org-contacts-try-completion-prefix)
(org-contacts-all-completions-prefix)
(org-contacts-make-collection-prefix)
(org-contacts-display-sort-function)
(org-contacts-icon-as-string, org-contacts-format-name)
(org-contacts-gnus-insinuate): Fix or add docstring.
---
org-contacts.el | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/org-contacts.el b/org-contacts.el
index 3ba521d4b2..ab44a7bc1d 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -171,7 +171,7 @@ This overrides `org-email-link-description-format' if set."
(org-contacts-files))))
(defun org-contacts-db ()
- "Return the latest Org Contacts Database"
+ "Return the latest Org Contacts Database."
(let* (todo-only
(contacts-matcher
(cdr (org-make-tags-matcher org-contacts-matcher)))
@@ -221,9 +221,9 @@ If both match values are nil, return all contacts."
(complete-with-action action table string pred)))))
(defun org-contacts-try-completion-prefix (to-match collection &optional
predicate)
- "Like `try-completion' but:
-- works only with list and alist;
-- looks at all prefixes rather than just the beginning of the string;"
+ "Custom implementation of `try-completion'.
+This version works only with list and alist and it looks at all
+prefixes rather than just the beginning of the string."
(loop with regexp = (concat "\\b" (regexp-quote to-match))
with ret = nil
with ret-start = nil
@@ -307,9 +307,9 @@ This function returns a list whose contains:
(+ new-start (- end1 start1)))))
(defun org-contacts-all-completions-prefix (to-match collection &optional
predicate)
- "Like `all-completions' but:
-- works only with list and alist;
-- looks at all prefixes rather than just the beginning of the string;"
+ "Custom version of `all-completions'.
+This version works only with list and alist and it looks at all
+prefixes rather than just the beginning of the string."
(loop with regexp = (concat "\\b" (regexp-quote to-match))
for el in collection
for string = (if (listp el) (car el) el)
@@ -328,8 +328,7 @@ This function returns a list whose contains:
string)))
(defun org-contacts-make-collection-prefix (collection)
- "Makes a collection function from COLLECTION which will match
-on prefixes."
+ "Make a collection function from COLLECTION which will match on prefixes."
(lexical-let ((collection collection))
(lambda (string predicate flag)
(cond ((eq flag nil)
@@ -350,6 +349,7 @@ on prefixes."
)))))
(defun org-contacts-display-sort-function (completions)
+ "Sort function for contacts display."
(mapcar (lambda (string)
(loop with len = (1- (length string))
for i upfrom 0 to len
@@ -572,6 +572,7 @@ This function should be called from
`gnus-article-prepare-hook'."
(org-set-property org-contacts-last-read-mail-property link)))))))
(defun org-contacts-icon-as-string ()
+ "Return the contact icon as a string."
(let ((image (org-contacts-get-icon)))
(concat
(propertize "-" 'display
@@ -609,12 +610,12 @@ This function should be called from
`gnus-article-prepare-hook'."
prompt (org-contacts-filter) predicate t initial-input hist def
inherit-input-method))
(defun org-contacts-format-name (name)
- "Trim any local formatting to get a bare name."
+ "Trim any local formatting to get a bare NAME."
;; Remove radio targets characters
(replace-regexp-in-string org-radio-target-regexp "\\1" name))
(defun org-contacts-format-email (name email)
- "Format a mail address."
+ "Format an EMAIL address corresponding to NAME."
(unless email
(error "`email' cannot be nul"))
(if name
@@ -641,7 +642,7 @@ This function should be called from
`gnus-article-prepare-hook'."
"Add some hooks for Gnus user.
This adds `org-contacts-gnus-check-mail-address' and
`org-contacts-gnus-store-last-mail' to
-`gnus-article-prepare-hook'. It also adds a binding on `;' in
+`gnus-article-prepare-hook'. It also adds a binding on `;' in
`gnus-summary-mode-map' to `org-contacts-gnus-article-from-goto'"
(require 'gnus)
(require 'gnus-art)
@@ -869,3 +870,7 @@ Requires google-maps-el."
collect (cons (list addr) (list :label (string-to-char (car contact)))))))
(provide 'org-contacts)
+
+(provide 'org-contacts)
+
+;;; org-contacts.el ends here
- [elpa] externals/org-contacts 6723942283 048/154: contrib/lisp/org-contacts.el: Remove calls to cl functions, (continued)
- [elpa] externals/org-contacts 6723942283 048/154: contrib/lisp/org-contacts.el: Remove calls to cl functions, ELPA Syncer, 2022/09/09
- [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 <=
- [elpa] externals/org-contacts f6d87ee7f3 044/154: contrib/lisp/org-contacts.el: Fix compiler warnings., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts b789764458 047/154: contrib/lisp/*el: Fix license information and add "This file is not part...", ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 58afa03d8c 050/154: Let org-contacts.el has the ability which can export email-address list, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts ea8cbe4ca1 013/154: Fix copyright years for elisp files in core and contrib., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts fb87d0eac0 032/154: contrib/lisp/org-contacts.el: Delete trailing whitespaces, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 43d2cdde45 057/154: contrib/lisp/org-contacts: Fix two typos in comments, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 271ec25b43 062/154: contrib/lisp/org-contacts.el: Permit to unload properly `org-contacts', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 4d41ad256d 074/154: Merge branch 'maint', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 36c6b30ec2 077/154: contrib/lisp/org-contacts.el: Add a hook to allow users to plug completion functions, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 2ec03e18b8 086/154: org-contacts: Fix org-contacts-matcher for BIRTHDAYs, ELPA Syncer, 2022/09/09