Function: erc-add-entry-to-list
erc-add-entry-to-list is a byte-compiled function defined in
erc-match.el.gz.
Signature
(erc-add-entry-to-list LIST PROMPT &optional COMPLETIONS)
Documentation
Add an entry interactively to a list.
LIST must be passed as a symbol The query happens using PROMPT. Completion is performed on the optional alist COMPLETIONS.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-match.el.gz
;; Functions:
(defun erc-add-entry-to-list (list prompt &optional completions)
"Add an entry interactively to a list.
LIST must be passed as a symbol
The query happens using PROMPT.
Completion is performed on the optional alist COMPLETIONS."
(let ((entry (completing-read
prompt
completions
(lambda (x)
(not (erc-member-ignore-case (car x) (symbol-value list)))))))
(if (erc-member-ignore-case entry (symbol-value list))
(error "\"%s\" is already on the list" entry)
(set list (cons entry (symbol-value list))))))