Function: erc-status-sidebar-prefer-target-as-name
erc-status-sidebar-prefer-target-as-name is a byte-compiled function
defined in erc-status-sidebar.el.gz.
Signature
(erc-status-sidebar-prefer-target-as-name BUFFER)
Documentation
Return some name to represent buffer in the sidebar.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-status-sidebar.el.gz
(defun erc-status-sidebar-prefer-target-as-name (buffer)
"Return some name to represent buffer in the sidebar."
(if-let* ((target (buffer-local-value 'erc--target buffer)))
(cond ((and erc-status-sidebar--trimpat (erc--target-channel-p target))
(string-trim-left (erc--target-string target)
erc-status-sidebar--trimpat))
((and erc-status-sidebar--prechan (erc--target-channel-p target))
(concat erc-status-sidebar--prechan
(erc--target-string target)))
(t (erc--target-string target)))
(buffer-name buffer)))