From: Richard Hansen Date: Tue, 28 Jun 2022 19:05:04 +0000 (-0400) Subject: whitespace: Include empty final line in BoB empty match X-Git-Tag: emacs-29.0.90~1856^2~598 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=395786f42b0eed361ee34cd398bc8ee33802ed04;p=emacs.git 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. --- diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 4a8117b75e0..8146eff9b0a 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'."