Function: erc-parse-prefix
erc-parse-prefix is a byte-compiled function defined in erc.el.gz.
Signature
(erc-parse-prefix)
Documentation
Return an alist of valid prefix character types and their representations.
Example: (operator) o => @, (voiced) v => +.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-parse-prefix ()
"Return an alist of valid prefix character types and their representations.
Example: (operator) o => @, (voiced) v => +."
(let ((str (or (erc-with-server-buffer (erc--get-isupport-entry 'PREFIX t))
;; provide a sane default
"(qaohv)~&@%+"))
types chars)
(when (string-match "^(\\([^)]+\\))\\(.+\\)$" str)
(setq types (match-string 1 str)
chars (match-string 2 str))
(let ((len (min (length types) (length chars)))
(i 0)
(alist nil))
(while (< i len)
(setq alist (cons (cons (elt types i) (elt chars i))
alist))
(setq i (1+ i)))
alist))))