Function: erc-default-target
erc-default-target is a byte-compiled function defined in erc.el.gz.
Signature
(erc-default-target)
Documentation
Return the current default target (as a character string) or nil if none.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
;; While `erc-default-target' happens to return nil in channel buffers
;; you've parted or from which you've been kicked, using it to detect
;; whether a channel is currently joined may become unreliable in the
;; future. For now, third-party code can use
;;
;; (erc-get-channel-user (erc-current-nick))
;;
;; A predicate may be provided eventually. For retrieving a target's
;; name regardless of subscription or connection status, new library
;; code should use `erc--default-target'. Third-party code should
;; continue to use `erc-default-target'.
(defun erc-default-target ()
"Return the current default target (as a character string) or nil if none."
(let ((tgt (car erc-default-recipients)))
(cond
((not tgt) nil)
((listp tgt) (cdr tgt))
(t tgt))))