emacs-diffs
[Top][All Lists]
Advanced

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

master 395786f42b 5/6: whitespace: Include empty final line in BoB empty


From: Lars Ingebrigtsen
Subject: master 395786f42b 5/6: whitespace: Include empty final line in BoB empty match
Date: Sun, 11 Sep 2022 07:46:36 -0400 (EDT)

branch: master
commit 395786f42b0eed361ee34cd398bc8ee33802ed04
Author: Richard Hansen <rhansen@rhansen.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    whitespace: Include empty final line in BoB empty match
    
    * lisp/whitespace.el (whitespace-empty-at-bob-regexp): Include any
    last line trailing whitespace in the BoB empty line match to ensure
    that those characters get highlighted.
---
 lisp/whitespace.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index 4a8117b75e..8146eff9b0 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -730,7 +730,7 @@ Used when `whitespace-style' includes `indentation',
   :group 'whitespace)
 
 
-(defcustom whitespace-empty-at-bob-regexp "\\`\\(\\([ \t]*\n\\)+\\)"
+(defcustom whitespace-empty-at-bob-regexp "\\`\\([ \t\n]*\\(?:\n\\|$\\)\\)"
   "Specify regexp for empty lines at beginning of buffer.
 
 Used when `whitespace-style' includes `empty'."



reply via email to

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