emacs/lisp/erc
F. Jason Park fee637468b Reconcile erc-stamp--date-stamps when merging buffers
* etc/ERC-NEWS: Mention new face `erc-information'.
* lisp/erc/erc-button.el (erc-button-add-buttons): Skip buttonization
when the "msg prop" `erc--skip' is present and contains the symbol
`button'.  Set `alist' to nil in the same guard condition as a
roundabout way of suppressing further processing.
* lisp/erc/erc-networks.el (erc--insert-admin-message): Forward
declaration.
(erc-networks--insert-transplanted-content)
(erc-networks--transplant-buffer-content): Replace former with latter.
Change signature to take source and destination buffers as parameters.
(erc-networks--transplant-target-buffer-function): New function-valued
variable.
(erc-networks--target-transplant-in-progress-p): New variable, a flag
for downstream code to detect when a transplant is underway.
(erc-networks--reclaim-orphaned-target-buffers): Defer to
`erc-networks--transplant-target-buffer-function' to handle the actual
transplant business.  Crucially, kill the buffer afterwards instead of
beforehand.  If new buffer-association bugs emerge related to the
combining of old or renamed target buffers, this reordering may be at
fault.
(erc-networks--copy-over-server-buffer-contents): Pass old and new
buffers to `erc-networks--insert-transplanted-content'.
* lisp/erc/erc-stamp.el
(erc-stamp--defer-date-insertion-on-post-modify): Set `fn' slot of
`erc-stamp--date' instance to `ignore' when running the actual
callback in order to conserve a little space.
(erc-stamp--date-mode): Add and remove hook members for
`erc-networks--copy-server-buffer-functions' and
`erc-networks--transplant-target-buffer-function'.
(erc-insert-timestamp-left-and-right): Always clear
`erc-timestamp-last-inserted-right' to ensure a right stamp
accompanies every date stamp.
(erc-stamp--dedupe-date-stamps)
(erc-stamp--dedupe-date-stamps-from-buffer)
(erc-stamp--dedupe-date-stamps-from-target-buffer): New functions.
Date stamp behavior was revamped as part of bug#60936.
* lisp/erc/erc.el (erc-informational): New face.
(erc--insert-admin-message): New function to hide some "msg prop"
complexity from "upstream" libraries, like `erc-networks', and thus
avoid more forward-declarations.  A less smelly approach would be to
devise a general interface owned by such libraries, or erc-common,
that `erc-mode' could then hook into on init.
(erc-display-message-highlight): Make face matching more limber to
accommodate the convention of face names lacking a "-face" suffix.
(erc-message-english-graft): New variable.
(erc-kill-channel): Inhibit execution of hook when
`erc-networks--target-transplant-in-progress-p' is non-nil.
* test/lisp/erc/erc-networks-tests.el
(erc-networks--rename-server-buffer--no-existing--orphan)
(erc-networks--rename-server-buffer--existing--reuse)
(erc-networks--rename-server-buffer--local-match)
(erc-networks--rename-server-buffer--local-nomatch): Use helper to
initialize markers.
* test/lisp/erc/erc-stamp-tests.el (erc-stamp--dedupe-date-stamps):
New test.  (Bug#70928)
2024-05-18 15:48:05 -07:00
..
ChangeLog.1 ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
ChangeLog.2 ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-autoaway.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-backend.el Don't kill server buffer with erc-kill-buffer-on-part 2024-05-18 15:48:05 -07:00
erc-button.el Reconcile erc-stamp--date-stamps when merging buffers 2024-05-18 15:48:05 -07:00
erc-capab.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-common.el Don't nest date stamp insertions in erc-stamp 2024-04-19 13:54:52 -07:00
erc-compat.el Remove "erc-" prefixed Compat definitions 2024-02-16 19:58:35 -08:00
erc-dcc.el ; Simplify (with-current-buffer (get-buffer ...) ...) 2024-03-14 12:40:26 +02:00
erc-desktop-notifications.el Port more notification senders to non-XDG systems 2024-03-13 11:01:39 +08:00
erc-ezbounce.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-fill.el Don't nest date stamp insertions in erc-stamp 2024-04-19 13:54:52 -07:00
erc-goodies.el Reuse command-indicator code for script lines in ERC 2024-03-23 15:10:32 -07:00
erc-ibuffer.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-identd.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-imenu.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-join.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-lang.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-list.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-log.el Don't kill server buffer with erc-kill-buffer-on-part 2024-05-18 15:48:05 -07:00
erc-match.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-menu.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-netsplit.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-networks.el Reconcile erc-stamp--date-stamps when merging buffers 2024-05-18 15:48:05 -07:00
erc-nicks.el ; * lisp/erc/erc-nicks.el: Fix typo in Commentary. 2024-04-07 12:59:21 -07:00
erc-notify.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-page.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-pcomplete.el Clarify purpose of module aliases in ERC 2024-01-07 15:11:26 -08:00
erc-replace.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc-ring.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-sasl.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-services.el ; Improve erc-services and upgrade documentation 2024-04-19 13:54:52 -07:00
erc-sound.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-speedbar.el Fix invisible erc-speedbar cursor in text terminals 2024-04-07 12:59:21 -07:00
erc-spelling.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-stamp.el Reconcile erc-stamp--date-stamps when merging buffers 2024-05-18 15:48:05 -07:00
erc-status-sidebar.el Fix invisible erc-speedbar cursor in text terminals 2024-04-07 12:59:21 -07:00
erc-track.el Prefer erc--skip property to erc-track--skipped-msgs 2024-05-08 17:14:02 -07:00
erc-truncate.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
erc-xdcc.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
erc.el Reconcile erc-stamp--date-stamps when merging buffers 2024-05-18 15:48:05 -07:00