[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'."
- master updated (feffb03a36 -> f47a5324f4), Lars Ingebrigtsen, 2022/09/11
- master 99e8faa725 4/6: whitespace: Reset `whitespace-buffer-changed' when refontifying, Lars Ingebrigtsen, 2022/09/11
- master 395786f42b 5/6: whitespace: Include empty final line in BoB empty match,
Lars Ingebrigtsen <=
- master 10573e0db7 1/6: ert-x: New `ert-with-test-buffer-selected' convenience macro, Lars Ingebrigtsen, 2022/09/11
- master dd02725c57 3/6: ; whitespace: Use `defvar-local' for buffer-local vars, Lars Ingebrigtsen, 2022/09/11
- master b6da1e4221 2/6: ; whitespace: Delete unused `whitespace-font-lock-refontify' var, Lars Ingebrigtsen, 2022/09/11
- master f47a5324f4 6/6: whitespace: Redo BoB/EoB empty line highlighting, Lars Ingebrigtsen, 2022/09/11