]> git.eshelyaron.com Git - emacs.git/commit
Add optional timezone param to erc-echo-timestamp
authorF. Jason Park <jp@neverwas.me>
Thu, 31 Aug 2023 06:15:22 +0000 (23:15 -0700)
committerF. Jason Park <jp@neverwas.me>
Mon, 11 Sep 2023 00:58:20 +0000 (17:58 -0700)
commit7c932fa307851ccef1cf17a1d7eec689af82a0ef
tree2a664a2401f848ce0edea747f43714c59e0f315f
parente1b8dbe9eaa40d0ac378e662872f9f131053a56f
Add optional timezone param to erc-echo-timestamp

* etc/ERC-NEWS: Move `erc-echo-timestamp' from misc section
to own entry, and mention option `erc-echo-timestamp-zone'.
* lisp/erc/erc-stamp.el (erc-echo-timestamps): Mention that some
finagling is required if enabling this option after activating the
module.
(erc-echo-timestamp-format): Add additional Custom choice constants
and make the existing default one of them.
(erc-echo-timestamp-zone): New option to specify timezone for option
`erc-echo-timestamps' and function `erc-echo-timestamp'.
(erc-stamp-mode, erc-stamp-enable, erc-stamp-disable): Call
`erc-stamp--setup' instead of `erc-munge-invisibility-spec'.
(erc-stamp--current-time): Use `current-time' instead of
`erc-current-time'.
(erc-add-timestamp): Improve readability slightly, and change
`fboundp' to `functionp' to avoid signaling an error when the
variable's value is not a symbol.
(erc-munge-invisibility-spec): Perform teardown when boolean flag
options, like `erc-timestamp-intangible' and `erc-echo-timestamps' are
nil.
(erc-stamp--setup): Call `erc-munge-invisibility-spec', possibly
binding timestamp options to nil to force a tear down).
(erc-stamp--last-stamp, erc-stamp--on-clear-message): New function and
helper state variable to tell Emacs not to clear the current timestamp
message when navigating within the same IRC message.
(erc-echo-timestamp): Add optional `zone' parameter, to be passed
directly to `format-time-string', when non-interactive, and massaged
sensibly otherwise.  Set the local variable `erc-stamp--last-stamp'.
* test/lisp/erc/erc-stamp-tests.el (erc-echo-timestamp): New test.
(Bug#60936)
etc/ERC-NEWS
lisp/erc/erc-stamp.el
test/lisp/erc/erc-stamp-tests.el