Function: erc-format-target-and/or-network
erc-format-target-and/or-network is a byte-compiled function defined
in erc.el.gz.
Signature
(erc-format-target-and/or-network)
Documentation
Return the network or the current target and network combined.
If the name of the network is not available, then use the shortened server name instead.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-format-target-and/or-network ()
"Return the network or the current target and network combined.
If the name of the network is not available, then use the
shortened server name instead."
(let ((network-name (or (and (fboundp 'erc-network-name) (erc-network-name))
(erc-shorten-server-name
(or erc-server-announced-name
erc-session-server)))))
(when (and network-name (symbolp network-name))
(setq network-name (symbol-name network-name)))
(cond ((erc-default-target)
(concat (erc-string-no-properties (erc-default-target))
"@" network-name))
((and network-name
(not (get-buffer network-name)))
(when erc-rename-buffers
(rename-buffer network-name))
network-name)
(t (buffer-name (current-buffer))))))