Function: erc-remove-entry-from-list
erc-remove-entry-from-list is a byte-compiled function defined in
erc-match.el.gz.
Signature
(erc-remove-entry-from-list LIST PROMPT)
Documentation
Remove an entry interactively from a list.
LIST must be passed as a symbol. The elements of LIST can be strings, or cons cells where the car is the string.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-match.el.gz
(defun erc-remove-entry-from-list (list prompt)
"Remove an entry interactively from a list.
LIST must be passed as a symbol.
The elements of LIST can be strings, or cons cells where the
car is the string."
(let* ((alist (mapcar (lambda (x)
(if (listp x)
x
(list x)))
(symbol-value list)))
(entry (completing-read
prompt
alist
nil
t)))
(if (erc-member-ignore-case entry (symbol-value list))
;; plain string
(set list (delete entry (symbol-value list)))
;; cons cell
(set list (delete (assoc entry (symbol-value list))
(symbol-value list))))))