emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 019baf28599 1/7: Remove newline from erc-fill regexp


From: F. Jason Park
Subject: master 019baf28599 1/7: Remove newline from erc-fill regexp
Date: Mon, 2 Oct 2023 20:38:27 -0400 (EDT)

branch: master
commit 019baf28599783162659b668330a4dab3d368ffe
Author: F. Jason Park <jp@neverwas.me>
Commit: F. Jason Park <jp@neverwas.me>

    Remove newline from erc-fill regexp
    
    * lisp/erc/erc-fill.el (erc-fill): Remove newline from character
    alternative in pattern for skipping past blank and whitespace-only
    lines.  It seems that as of e61a0398 "regex.c: Consolidate the two
    analysis functions", Emacs no longer sees a newline-dollar sequence as
    matching an empty line.  Also lose `save-match-data', which doesn't
    appear to serve any purpose here.
---
 lisp/erc/erc-fill.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el
index f4835f71278..0e6b5a3efb8 100644
--- a/lisp/erc/erc-fill.el
+++ b/lisp/erc/erc-fill.el
@@ -158,9 +158,8 @@ You can put this on `erc-insert-modify-hook' and/or 
`erc-send-modify-hook'."
     (when (or erc-fill--function erc-fill-function)
       ;; skip initial empty lines
       (goto-char (point-min))
-      (save-match-data
-        (while (and (looking-at "[ \t\n]*$")
-                    (= (forward-line 1) 0))))
+      (while (and (looking-at (rx bol (* (in " \t")) eol))
+                  (zerop (forward-line 1))))
       (unless (eobp)
         (save-restriction
           (narrow-to-region (point) (point-max))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]