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'."