Add if logic on function erc-nicknames-list

This commit is contained in:
stardiviner 2022-03-06 22:19:24 +08:00
parent 21d4ae5367
commit cf8ae48b37

View file

@ -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."