Function: erc-display-line
erc-display-line is a byte-compiled function defined in erc.el.gz.
Signature
(erc-display-line STRING &optional BUFFER)
Documentation
Display STRING in the ERC BUFFER.
All screen output must be done through this function. If BUFFER is nil
or omitted, the default ERC buffer for the erc-session-server is used.
The BUFFER can be an actual buffer, a list of buffers, all or active.
If BUFFER = all, the string is displayed in all the ERC buffers for the
current session. active means the current active buffer
(erc-active-buffer(var)/erc-active-buffer(fun)). If the buffer can't be resolved, the current
buffer is used. erc-display-line-1 is used to display STRING.
If STRING is nil, the function does nothing.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-display-line (string &optional buffer)
"Display STRING in the ERC BUFFER.
All screen output must be done through this function. If BUFFER is nil
or omitted, the default ERC buffer for the `erc-session-server' is used.
The BUFFER can be an actual buffer, a list of buffers, `all' or `active'.
If BUFFER = `all', the string is displayed in all the ERC buffers for the
current session. `active' means the current active buffer
\(`erc-active-buffer'). If the buffer can't be resolved, the current
buffer is used. `erc-display-line-1' is used to display STRING.
If STRING is nil, the function does nothing."
(let ((inhibit-point-motion-hooks t)
new-bufs)
(dolist (buf (cond
((bufferp buffer) (list buffer))
((listp buffer) buffer)
((processp buffer) (list (process-buffer buffer)))
((eq 'all buffer)
;; Hmm, or all of the same session server?
(erc-buffer-list nil erc-server-process))
((and (eq 'active buffer) (erc-active-buffer))
(list (erc-active-buffer)))
((erc-server-buffer-live-p)
(list (process-buffer erc-server-process)))
(t (list (current-buffer)))))
(when (buffer-live-p buf)
(erc-display-line-1 string buf)
(push buf new-bufs)))
(when (null new-bufs)
(erc-display-line-1 string (if (erc-server-buffer-live-p)
(process-buffer erc-server-process)
(current-buffer))))))