From 9e7658ac8d90af2fe1ddcb5d5625db827d2d5560 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Tue, 28 Jun 2022 15:05:04 -0400 Subject: [PATCH 6/7] 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 e75b85ffac..fa212e6701 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -730,7 +730,7 @@ whitespace-indentation-regexp :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'." -- 2.36.1