Function: erc-autoaway-set-away

erc-autoaway-set-away is a byte-compiled function defined in erc-autoaway.el.gz.

Signature

(erc-autoaway-set-away IDLE-TIME &optional NOTEST)

Documentation

Set the away state globally.

If NOTEST is specified, do not check to see whether there is an active server buffer available.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-autoaway.el.gz
(defun erc-autoaway-set-away (idle-time &optional notest)
  "Set the away state globally.

If NOTEST is specified, do not check to see whether there is an
active server buffer available."
  ;; Note that the idle timer runs, even when Emacs is inactive.  In
  ;; order to prevent flooding when we connect, we test for an
  ;; existing process.
  (when (or notest (erc-autoaway-some-open-server-buffer))
    (setq erc-autoaway-caused-away t)
    (erc-cmd-GAWAY (format-message erc-autoaway-message idle-time))))