Function: erc-bufbar-enable
erc-bufbar-enable is an interactive and byte-compiled function defined
in erc-status-sidebar.el.gz.
Signature
(erc-bufbar-enable)
Documentation
Enable ERC bufbar mode.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-status-sidebar.el.gz
;;;###autoload(autoload 'erc-bufbar-mode "erc-status-sidebar" nil t)
(define-erc-module bufbar nil
"Show `erc-track'-like activity in a side window.
When enabling, show the sidebar immediately in the current frame
if called from a connected ERC buffer. Otherwise, arrange for
doing so on connect or whenever next displaying a new ERC buffer.
When disabling, hide the status window in all frames. With a
negative prefix arg, also shutdown the session. Normally, this
module only allows one sidebar window in an Emacs session. To
override this, use `erc-status-sidebar-open' to force creation
and `erc-status-sidebar-close' to hide a single instance on the
current frame only."
((unless erc-track-mode
(unless (memq 'track erc-modules)
(erc--warn-once-before-connect 'erc-bufbar-mode
"Module `bufbar' needs global module `track'. Enabling now."
" This will affect \C-]all\C-] ERC sessions."
" Add `track' to `erc-modules' to silence this message."))
(erc-track-mode +1))
(add-hook 'erc--setup-buffer-hook #'erc-status-sidebar--open)
;; Preserve side-window dimensions after `custom-buffer-done'.
(when-let* (((not erc--updating-modules-p))
(buf (or (and (derived-mode-p 'erc-mode) (current-buffer))
(car (erc-buffer-filter
(lambda () erc-server-connected))))))
(with-current-buffer buf
(erc-status-sidebar--open))))
((remove-hook 'erc--setup-buffer-hook #'erc-status-sidebar--open)
(erc-status-sidebar-close 'all-frames)
(when-let* ((arg erc--module-toggle-prefix-arg)
((numberp arg))
((< arg 0)))
(erc-status-sidebar-kill))))