master f0e01e0d141 4/9: Make prefix-body boundary more detectable in ERC

"F. Jason Park" <[email protected]> Tue, 30 Jun 2026 23:37:21 -0400 (EDT)
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: master
commit f0e01e0d14150c490fc3c09993192eb3279c7c6c
Author: F. Jason Park <[email protected]>
Commit: F. Jason Park <[email protected]>

    Make prefix-body boundary more detectable in ERC
    
    * lisp/erc/erc-button.el
    (erc-button--display-error-notice-with-keys-and-warn): Use utility for
    skipping past first word.
    * lisp/erc/erc-fill.el (erc-fill-wrap): Use new `erc--pfx' msg-prop
    interface.
    * lisp/erc/erc-goodies.el (erc--command-indicator-body-find): New
    function.
    (erc--command-indicator-display): Add `erc--pfx' function-valued msg
    prop for moving past command-indicator prompt to start of body.  Stash
    inserted prompt string in oneoff `erc--command-indicator' prop.
    * lisp/erc/erc.el (erc--ensure-spkr-prop): Add `erc--pfx' msg prop for
    finding the start of the message body after a speaker tag with the
    `erc--speaker' text property.
    (erc-display-message-highlight): Add `erc--pfx' functions for known
    variants of the `erc-display-message' TYPE parameter, such as `notice'
    and `error'.
    (erc--ctcp-action-speaker-in-prefix-p): New variable.
    (erc--pfx-skip-word-fwd, erc--pfx-skip-spkr-fwd)
    (erc--pfx-skip-notice-fwd, erc--pfx-skip-template-fwd): New functions.
    * test/lisp/erc/erc-tests.el (erc--pfx-skip-notice-fwd)
    (erc--pfx-skip-template-fwd): New tests.  (Bug#73798)
    
    ;; test/lisp/erc/resources/fill/snapshots/merge-01-start.eld:
    ;; test/lisp/erc/resources/fill/snapshots/merge-02-right.eld:
    ;; test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld:
    ;; test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld:
    ;; test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld:
    ;; test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld:
    ;; test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld:
    ;; test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld:
    ;; test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld:
    ;; test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld: Update.
---
 lisp/erc/erc-button.el                             |  4 +-
 lisp/erc/erc-fill.el                               | 20 ++++----
 lisp/erc/erc-goodies.el                            |  6 +++
 lisp/erc/erc.el                                    | 42 +++++++++++++++-
 test/lisp/erc/erc-tests.el                         | 57 ++++++++++++++++++++++
 .../resources/fill/snapshots/merge-01-start.eld    |  2 +-
 .../resources/fill/snapshots/merge-02-right.eld    |  2 +-
 .../erc/resources/fill/snapshots/merge-wrap-01.eld |  2 +-
 .../fill/snapshots/merge-wrap-indicator-pre-01.eld |  2 +-
 .../fill/snapshots/monospace-01-start.eld          |  2 +-
 .../fill/snapshots/monospace-02-right.eld          |  2 +-
 .../resources/fill/snapshots/monospace-03-left.eld |  2 +-
 .../fill/snapshots/monospace-04-reset.eld          |  2 +-
 .../resources/fill/snapshots/spacing-01-mono.eld   |  2 +-
 .../resources/fill/snapshots/stamps-left-01.eld    |  2 +-
 15 files changed, 126 insertions(+), 23 deletions(-)

diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el
index 3cb2d527cd4..a7b5855e9eb 100644
--- a/lisp/erc/erc-button.el
+++ b/lisp/erc/erc-button.el
@@ -873,9 +873,7 @@ non-strings, concatenate leading string members before applying
     (with-temp-buffer
       (insert string)
       (goto-char (point-min))
-      (with-syntax-table lisp-mode-syntax-table
-        (skip-syntax-forward "^-"))
-      (forward-char)
+      (erc--pfx-skip-word-fwd)
       (erc--lwarn
        'erc :warning (buffer-substring-no-properties (point) (point-max))))))
 
diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el
index 7ca29f16e03..0d72bde5309 100644
--- a/lisp/erc/erc-fill.el
+++ b/lisp/erc/erc-fill.el
@@ -706,15 +706,17 @@ See `erc-fill-wrap-mode' for details."
     (let ((len (or (and erc-fill--wrap-length-function
                         (funcall erc-fill--wrap-length-function))
                    (and-let* ((msg-prop (erc--check-msg-prop 'erc--msg))
-                              ((not (eq msg-prop 'unknown))))
-                     (when-let* ((e (erc--get-speaker-bounds))
-                                 (b (pop e))
-                                 ((or erc-fill--wrap-action-dedent-p
-                                      (not (erc--check-msg-prop 'erc--ctcp
-                                                                'ACTION)))))
-                       (goto-char e))
-                     (skip-syntax-forward "^-")
-                     (forward-char)
+                              (_ (not (eq msg-prop 'unknown))))
+                     (if-let* ((fn (erc--check-msg-prop 'erc--pfx)))
+                         (let ((erc--ctcp-action-speaker-in-prefix-p
+                                erc-fill--wrap-action-dedent-p))
+                           (funcall fn))
+                       ;; FIXME remove this before releasing ERC 5.7.
+                       (unless (eq msg-prop 'datestamp)
+                         (erc--lwarn 'erc-fill :error
+                                     "Missing `erc--pfx' skip-fwd function: %S"
+                                     (list :msg-prop msg-prop
+                                           :buffer-string (buffer-string)))))
                      (cond ((eq msg-prop 'datestamp)
                             (when erc-fill--wrap-rejigger-last-message
                               (set-marker erc-fill--wrap-last-msg (point-min)))
diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el
index e99d5f68175..ec110b65b8c 100644
--- a/lisp/erc/erc-goodies.el
+++ b/lisp/erc/erc-goodies.el
@@ -633,6 +633,9 @@ Do nothing if the variable `erc-command-indicator' is nil."
           (erc--input-split-substxt state) #'erc--command-indicator-display)
     (erc-send-distinguish-noncommands state)))
 
+(defun erc--command-indicator-body-find ()
+  (search-forward (erc--check-msg-prop 'erc--command-indicator) (pos-eol) t))
+
 ;; This function used to be called `erc-display-command'.  It was
 ;; neutered in ERC 5.3.x (Emacs 24.5), commented out in 5.4, removed
 ;; in 5.5, and restored in 5.6.
@@ -651,6 +654,9 @@ Do nothing if the variable `erc-command-indicator' is nil."
                                             'hash-table)))))
         (when-let* ((string (erc-command-indicator))
                     (erc-input-marker (copy-marker erc-input-marker)))
+          (puthash 'erc--command-indicator string erc--msg-props)
+          (puthash 'erc--pfx #'erc--command-indicator-body-find
+                   erc--msg-props)
           (erc-display-prompt nil nil string 'erc-command-indicator-face)
           (remove-text-properties insert-position (point)
                                   '(field nil erc-prompt nil))
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 591ca1f5fbe..22f2a90de63 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -188,6 +188,9 @@ as of ERC 5.6:
  - `erc--skip': list of symbols known to modules that indicate an
     intent to skip or simplify module-specific processing
 
+ - `erc--pfx': function taking no args that advances point to the
+    start of the semantic body
+
  - `erc--ephemeral': a symbol prefixed by or matching a module
     name; indicates to other modules and members of modification
     hooks that the current message should not affect stateful
@@ -3269,11 +3272,13 @@ when present.  Assume NICK itself to be free of any text props,
 and return it."
   (cond (erc--msg-props
          (puthash 'erc--spkr nick erc--msg-props)
+         (puthash 'erc--pfx #'erc--pfx-skip-spkr-fwd erc--msg-props)
          (dolist (entry overrides)
            (puthash (car entry) (cdr entry) erc--msg-props)))
         (erc--msg-prop-overrides
          (setq erc--msg-prop-overrides
-               `((erc--spkr . ,nick) ,@overrides ,@erc--msg-prop-overrides))))
+               `((erc--spkr . ,nick) (erc--pfx . ,#'erc--pfx-skip-spkr-fwd)
+                 ,@overrides ,@erc--msg-prop-overrides))))
   nick)
 
 (defun erc-string-invisible-p (string)
@@ -3868,8 +3873,14 @@ retrieval by `text-properties-at' and friends."
 
 See also `erc-make-notice'."
   (cond ((eq type 'notice)
+         (when erc--msg-props
+           (puthash 'erc--pfx #'erc--pfx-skip-notice-fwd erc--msg-props))
          (erc-make-notice string))
         (t
+         (when (and erc--msg-props ; prefer notice if combined
+                    (not (erc--check-msg-prop 'erc--pfx
+                                              #'erc--pfx-skip-notice-fwd)))
+           (puthash 'erc--pfx #'erc--pfx-skip-template-fwd erc--msg-props))
          (erc-put-text-property
           0 (length string)
           'font-lock-face
@@ -6283,6 +6294,35 @@ Assume buffer is narrowed to the confines of an inserted message."
                                          'erc--speaker nil)))
     (cons beg (next-single-property-change beg 'erc--speaker))))
 
+(defvar erc--ctcp-action-speaker-in-prefix-p nil
+  ;; This variable replaces `erc-fill--wrap-action-dedent-p' in ERC 5.6.
+  "Whether the speaker of a /ME is part of the prefix rather than the body.")
+
+;; Insertion hook members defer to the function value of the `erc--pfx'
+;; msg prop to find the "body" portion of a message after a prefix, such
+;; as a "<speaker> " tag, assuming the `erc--msg' prop isn't `unknown'.
+(defun erc--pfx-skip-word-fwd ()
+  "Go to a space following an initial run of non-space chars."
+  (unless (and (bobp) (eq ?\s (char-after (point))))
+    (search-forward " " (pos-eol) t)))
+
+(defun erc--pfx-skip-spkr-fwd ()
+  "Move point after the first space following the speaker tag.
+That's one char beyond the last with a `erc--speaker' text property."
+  (let ((bounds (erc--get-speaker-bounds)))
+    (when (or erc--ctcp-action-speaker-in-prefix-p
+              (not (erc--check-msg-prop 'erc--ctcp 'ACTION)))
+      (goto-char (cdr bounds)))
+    (search-forward " " (pos-eol) t)))
+
+(defun erc--pfx-skip-notice-fwd ()
+  "Move point past `erc-notice-prefix'."
+  (search-forward erc-notice-prefix (+ (point) (length erc-notice-prefix)) t))
+
+(defun erc--pfx-skip-template-fwd ()
+  "Skip common prefixes from the English format-template catalog."
+  (search-forward-regexp (rx bol (| "\n\n*** " "==> ")) (+ (point) 6) t))
+
 (defvar erc--cmem-from-nick-function #'erc--cmem-get-existing
   "Function maybe returning a \"channel member\" cons from a nick.
 Must return either nil or a cons of an `erc-server-user' and an
diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el
index f2f874717e9..b3a39c66f5a 100644
--- a/test/lisp/erc/erc-tests.el
+++ b/test/lisp/erc/erc-tests.el
@@ -3065,6 +3065,63 @@
 
     (when noninteractive (kill-buffer))))
 
+(ert-deftest erc--pfx-skip-notice-fwd ()
+  (erc-tests-common-make-server-buf)
+  ;; Inhibit login I/O.
+  (setq erc-logged-in t)
+
+  ;; Moves past leading `erc-notice-prefix'.
+  (let* ((calledp nil)
+         (erc-insert-modify-hook
+          (lambda ()
+            (goto-char (point-min))
+            (erc--pfx-skip-notice-fwd)
+            (should (looking-at (rx "One!" eol)))
+            (setq calledp t))))
+    (erc-tests-common-simulate-line ":irc.foonet.net 375 tester :One!")
+    (should calledp))
+
+  ;; Respects customized option.
+  (let* ((erc-notice-prefix "~~> ")
+         (calledp nil)
+         (erc-insert-modify-hook
+          (lambda ()
+            (goto-char (point-min))
+            (erc--pfx-skip-notice-fwd)
+            (should (looking-at (rx "Two!" eol)))
+            (should (looking-back (rx bol "~~> ")))
+            (setq calledp t))))
+    (erc-tests-common-simulate-line ":irc.foonet.net 372 tester :Two!")
+    (should calledp)))
+
+(ert-deftest erc--pfx-skip-template-fwd ()
+  (erc-tests-common-make-server-buf)
+
+  ;; Skips over two leading newlines.
+  (let* ((calledp nil)
+         (erc-insert-modify-hook
+          (lambda ()
+            (goto-char (point-min))
+            (should (looking-at (rx eol bol)))
+            (erc--pfx-skip-template-fwd)
+            (should (equal (buffer-substring (point) (pos-eol))
+                           "ERC finished ***"))
+            (setq calledp t))))
+    (erc-display-message nil 'error (current-buffer) 'finished)
+    (should calledp))
+
+  ;; Does the same for arbitrary non-whitespace prefix.
+  (let* ((calledp nil)
+         (erc-insert-modify-hook
+          (lambda ()
+            (goto-char (point-min))
+            (erc--pfx-skip-template-fwd)
+            (should (looking-at (rx "ERROR from : Quit 123" eol)))
+            (should (looking-back (rx bol "==> ")))
+            (setq calledp t))))
+    (erc-tests-common-simulate-line "ERROR :Quit 123")
+    (should calledp)))
+
 (defun erc-tests--format-my-nick (message)
   (concat (erc-format-my-nick)
           (propertize message 'font-lock-face 'erc-input-face)))
diff --git a/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld b/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld
index d1dde661020..d01d4c25f87 100644
--- a/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld
+++ b/test/lisp/erc/resources/fill/snapshots/merge-01-start.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr  1 2023]\n<bob> zero. [07:00]\n<al [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr  1 2023]\n<bob> zero. [07:00]\n<al [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld b/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld
index f2770ce1c62..677e131aa25 100644
--- a/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld
+++ b/test/lisp/erc/resources/fill/snapshots/merge-02-right.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr  1 2023]\n<bob> zero. [07:00]\n<al [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr  1 2023]\n<bob> zero. [07:00]\n<al [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld b/test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld
index fc011e14530..82f136d8266 100644
--- a/test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld
+++ b/test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr  1 2023]\n<bob> zero. [07:00]\n<bo [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr  1 2023]\n<bob> zero. [07:00]\n<bo [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld b/test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld
index ad9bec913a7..3c7c5e58910 100644
--- a/test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld
+++ b/test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr  1 2023]\n<bob> zero. [07:00]\n<bo [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n\n[Sat Apr  1 2023]\n<bob> zero. [07:00]\n<bo [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld b/test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld
index 8fee2a8d0d8..71f97b3fafc 100644
--- a/test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld
+++ b/test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc--msg datestamp erc--ts 0 field erc [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc--msg datestamp erc--ts 0 field erc [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld b/test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld
index e0d529dd8a4..d992ec108c7 100644
--- a/test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld
+++ b/test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc--msg datestamp erc--ts 0 field erc [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc--msg datestamp erc--ts 0 field erc [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld b/test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld
index cd8c0298ad1..f5d1f19972d 100644
--- a/test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld
+++ b/test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc--msg datestamp erc--ts 0 field erc [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc--msg datestamp erc--ts 0 field erc [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld b/test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld
index 8fee2a8d0d8..71f97b3fafc 100644
--- a/test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld
+++ b/test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc--msg datestamp erc--ts 0 field erc [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc--msg datestamp erc--ts 0 field erc [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld b/test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld
index 211e9afac22..1d14672dbc3 100644
--- a/test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld
+++ b/test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld
@@ -1 +1 @@
-#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n<bob> This buffer is for text.\n*** one two t [...]
\ No newline at end of file
+#("\n\n\n[Thu Jan  1 1970]\n*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect. [00:00]\n<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n<bob> This buffer is for text.\n*** one two t [...]
diff --git a/test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld b/test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld
index 1b22b6c5cfd..2310b1d7af2 100644
--- a/test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld
+++ b/test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld
@@ -1 +1 @@
-#("\n\n[00:00]*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.\n[00:00]<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n[00:00]<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc--msg notice erc--ts 0 display #3=(#5=(marg [...]
\ No newline at end of file
+#("\n\n[00:00]*** This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.\n[00:00]<alice> bob: come, you are a tedious fool: to the purpose. What was done to Elbow's wife, that he hath cause to complain of? Come me to what was done to her.\n[00:00]<bob> alice: Either your unparagoned mistress is dead, or she's outprized by a trifle.\n" 2 3 (erc--msg notice erc--ts 0 erc--pfx erc--pfx-sk [...]