Function: rcirc-record-activity

rcirc-record-activity is a byte-compiled function defined in rcirc.el.gz.

Signature

(rcirc-record-activity BUFFER &optional TYPE)

Documentation

Record BUFFER activity with TYPE.

Source Code

;; Defined in /usr/src/emacs/lisp/net/rcirc.el.gz
(defun rcirc-record-activity (buffer &optional type)
  "Record BUFFER activity with TYPE."
  (with-current-buffer buffer
    (let ((old-activity rcirc-activity)
	  (old-types rcirc-activity-types))
      (when (and (not (get-buffer-window (current-buffer) t))
                 (not (and rcirc-track-ignore-server-buffer-flag
                           (eq rcirc-server-buffer (current-buffer)))))
	(setq rcirc-activity
	      (sort (if (memq (current-buffer) rcirc-activity) rcirc-activity
                      (cons (current-buffer) rcirc-activity))
		    (lambda (b1 b2)
		      (let ((t1 (buffer-local-value 'rcirc-last-post-time b1))
			    (t2 (buffer-local-value 'rcirc-last-post-time b2)))
			(time-less-p t2 t1)))))
	(cl-pushnew type rcirc-activity-types)
	(unless (and (equal rcirc-activity old-activity)
		     (member type old-types))
	  (rcirc-update-activity-string)))))
  (run-hook-with-args 'rcirc-activity-functions buffer))