branch: externals/org-contacts commit cf8ae48b37207f09acc3a9f654743b3df8b7710f Author: stardiviner <numbch...@gmail.com> Commit: stardiviner <numbch...@gmail.com>
Add if logic on function erc-nicknames-list --- org-contacts.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/org-contacts.el b/org-contacts.el index d6e2e11bab..206838ad77 100644 --- a/org-contacts.el +++ b/org-contacts.el @@ -1040,8 +1040,11 @@ address." &optional predicate require-match initial-input hist def inherit-input-method) "Like `completing-read' but reads a nickname." - (org-completing-read prompt (append collection (erc-nicknames-list)) predicate require-match - initial-input hist def inherit-input-method)) + (if (featurep 'erc) + (org-completing-read prompt (append collection (erc-nicknames-list)) predicate require-match + initial-input hist def inherit-input-method) + (org-completing-read prompt collection predicate require-match + initial-input hist def inherit-input-method))) (defun erc-nicknames-list () "Return all nicknames of all ERC buffers."