emacs/lisp/erc
F. Jason Park 379d35695b Make some erc-stamp functions more limber
* lisp/erc/erc-stamp.el (erc-timestamp-format-right): Deprecate option
and change meaning of its nil value to fall through to
`erc-timestamp-format'.  Do this to allow modules to predict what the
right-hand stamp's final width will be.  This also saves
`erc-insert-timestamp-left-and-right' from calling
`erc-format-timestamp' again for every inserted message.
(erc-stamp-mode, erc-stamp-enable, erc-stamp-disable): Add
`erc-stamp--recover-on-reconnect' to `erc-mode-hook'.
(erc-stamp--recover-on-reconnect): Add function to reuse last values
of `erc-timestamp-last-inserted' and friends to avoid reprinting
stamps when reconnecting.
(erc-stamp--current-time): Add new generic function and method to
return current time.  Default to calling `erc-current-time'.  Also add
new internal variable of the same name to hold time value used to
construct formatted stamps passed to `erc-insert-timestamp-function'.
(erc-add-timestamp): Bind `erc-stamp--current-time' when calling
`erc-insert-timestamp-function'.
(erc-stamp--insert-date-function): New variable for modules to tweak
date-insertion.
(erc-insert-timestamp-left-and-right): Use STRING parameter and favor
it over the now deprecated `erc-timestamp-format-right' to avoid
formatting twice.  Also extract current time from the variable
`erc-stamp--current-time' for similar reasons.  And defer to
`erc-stamp--insert-date-function' to insert left stamp.  (Bug#60936.)
(erc-stamp--tz): New internal variable.
(erc-format-timestamp): Pass `erc-stamp--tz' as time-zone to
`format-time-string'.
2023-04-08 14:23:51 -07:00
..
ChangeLog.1 ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ChangeLog.2 ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-autoaway.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-backend.el Copy over upstream Compat macros to erc-compat 2023-04-08 14:23:50 -07:00
erc-button.el Modify erc-mode-map in module definitions 2023-04-08 14:23:51 -07:00
erc-capab.el Don't associate ERC modules with undefined groups 2023-04-08 14:23:51 -07:00
erc-common.el Fill doc strings for ERC modules 2023-04-08 14:23:51 -07:00
erc-compat.el Optionally prompt for more ERC entry-point params 2023-04-08 14:23:51 -07:00
erc-dcc.el Fix DCC GET flag parsing in erc-dcc 2023-04-08 14:23:50 -07:00
erc-desktop-notifications.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-ezbounce.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-fill.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-goodies.el Add option to show visual erc-keep-place indicator 2023-04-08 14:23:51 -07:00
erc-ibuffer.el Don't require erc-goodies in erc.el 2023-04-08 14:23:51 -07:00
erc-identd.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-imenu.el Convert ERC's Imenu integration into proper module 2023-04-08 14:23:51 -07:00
erc-join.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-lang.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-list.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-log.el Modify erc-mode-map in module definitions 2023-04-08 14:23:51 -07:00
erc-match.el Modify erc-mode-map in module definitions 2023-04-08 14:23:51 -07:00
erc-menu.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-netsplit.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-networks.el Remove obsolete server buffers on MOTD in erc-track 2023-01-10 06:34:01 -08:00
erc-notify.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-page.el Don't require erc-goodies in erc.el 2023-04-08 14:23:51 -07:00
erc-pcomplete.el Leverage loaddefs for migrating ERC modules 2023-04-08 14:23:50 -07:00
erc-replace.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-ring.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-sasl.el Split overlong outgoing messages in erc-sasl 2023-04-08 14:23:50 -07:00
erc-services.el Leverage loaddefs for migrating ERC modules 2023-04-08 14:23:50 -07:00
erc-sound.el Leverage loaddefs for migrating ERC modules 2023-04-08 14:23:50 -07:00
erc-speedbar.el Don't require erc-goodies in erc.el 2023-04-08 14:23:51 -07:00
erc-spelling.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-stamp.el Make some erc-stamp functions more limber 2023-04-08 14:23:51 -07:00
erc-status-sidebar.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-track.el Ignore killed buffers when switching in erc-track 2023-04-08 14:23:51 -07:00
erc-truncate.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-xdcc.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc.el Adjust some old text properties in ERC buffers 2023-04-08 14:23:51 -07:00