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."
  (if-let ((erc--target)
           (name (if-let ((erc-networks--id)
                          (esid (erc-networks--id-symbol erc-networks--id)))
                     (symbol-name esid)
                   (erc-shorten-server-name (or erc-server-announced-name
                                                erc-session-server)))))
      (concat (erc--target-string erc--target) "@" name)
    (buffer-name)))