Function: erc-insert-timestamp-left-and-right
erc-insert-timestamp-left-and-right is a byte-compiled function
defined in erc-stamp.el.gz.
Signature
(erc-insert-timestamp-left-and-right STRING)
Documentation
This is another function that can be used with erc-insert-timestamp-function.
If the date is changed, it will print a blank line, the date, and another blank line. If the time is changed, it will then print it off to the right.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-stamp.el.gz
(defun erc-insert-timestamp-left-and-right (_string)
"This is another function that can be used with `erc-insert-timestamp-function'.
If the date is changed, it will print a blank line, the date, and
another blank line. If the time is changed, it will then print
it off to the right."
(let* ((ct (current-time))
(ts-left (erc-format-timestamp ct erc-timestamp-format-left))
(ts-right (erc-format-timestamp ct erc-timestamp-format-right)))
;; insert left timestamp
(unless (string-equal ts-left erc-timestamp-last-inserted-left)
(goto-char (point-min))
(erc-put-text-property 0 (length ts-left) 'field 'erc-timestamp ts-left)
(insert ts-left)
(setq erc-timestamp-last-inserted-left ts-left))
;; insert right timestamp
(let ((erc-timestamp-only-if-changed-flag t)
(erc-timestamp-last-inserted erc-timestamp-last-inserted-right))
(erc-insert-timestamp-right ts-right)
(setq erc-timestamp-last-inserted-right ts-right))))