Function: erc-status-sidebar-refresh
erc-status-sidebar-refresh is an interactive and byte-compiled
function defined in erc-status-sidebar.el.gz.
Signature
(erc-status-sidebar-refresh)
Documentation
Update the content of the sidebar.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-status-sidebar.el.gz
(defun erc-status-sidebar-refresh ()
"Update the content of the sidebar."
(interactive)
(let ((chanlist (apply erc-status-sidebar-channel-sort
(erc-channel-list nil) nil)))
(with-current-buffer (erc-status-sidebar-get-buffer)
(erc-status-sidebar-writable
(delete-region (point-min) (point-max))
(goto-char (point-min))
(dolist (chanbuf chanlist)
(let* ((tup (seq-find (lambda (tup) (eq (car tup) chanbuf))
erc-modified-channels-alist))
(count (if tup (cadr tup)))
(face (if tup (cddr tup)))
(channame (apply erc-status-sidebar-channel-format
(buffer-name chanbuf) count face nil))
(cnlen (length channame)))
(put-text-property 0 cnlen 'erc-buf chanbuf channame)
(put-text-property 0 cnlen 'mouse-face 'highlight channame)
(put-text-property
0 cnlen 'help-echo
"mouse-1: switch to buffer in other window" channame)
(insert channame "\n")))))))