Function: erc-stamp--setup

erc-stamp--setup is a byte-compiled function defined in erc-stamp.el.gz.

Signature

(erc-stamp--setup)

Documentation

Enable or disable buffer-local erc-stamp-mode(var)/erc-stamp-mode(fun) modifications.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-stamp.el.gz
(defun erc-stamp--setup ()
  "Enable or disable buffer-local `erc-stamp-mode' modifications."
  (if erc-stamp-mode
      (progn
        (erc-stamp--manage-local-options-state)
        (add-function :around (local 'erc--clear-function)
                      #'erc-stamp--reset-on-clear '((depth . 40))))
    (let (erc-echo-timestamps erc-hide-timestamps erc-timestamp-intangible)
      (erc-stamp--manage-local-options-state))
    ;; Undo local mods from `erc-insert-timestamp-left-and-right'.
    (erc-stamp--date-mode -1) ; kills `erc-timestamp-last-inserted-left'
    (remove-function (local 'erc--clear-function)
                     #'erc-stamp--reset-on-clear)
    (kill-local-variable 'erc-stamp--last-stamp)
    (kill-local-variable 'erc-timestamp-last-inserted)
    (kill-local-variable 'erc-timestamp-last-inserted-right)
    (kill-local-variable 'erc-stamp--deferred-date-stamp)
    (kill-local-variable 'erc-stamp--date-stamps)
    (kill-local-variable 'erc-stamp--date-format-end)))