> Stefan, is there a way of avoiding this effect, perhaps by using a > function in whitespace-font-lock-keywords? We could of course replace the regexp with a function and thus do "whatever we want", as in: ,@(when (memq 'missing-newline-at-eof whitespace-active-style) ;; Show missing newline. `(,(lambda (limit) (when (and (re-search-forward ".\\'" nil t) ;; Don't mark the end of the buffer if point is ;; there -- it probably means that the user is ;; typing something at the end of the buffer. (/= whitespace-point (point-max))) (put-text-property (match-beginning 0) (match-end 0) 'face 'whitespace-missing-newline-at-eof) nil)))) But personally I think the root cause is the use of OVERRIDE and I'd replace it with `prepend` as in the patch below, but whitespace uses OVERRIDE "everywhere", whereas my argument would suggest it should use `prepend` at all those places, which is likely beyond the scope of `emacs-30`. Stefan