Stefan Monnier writes: > [ It'd have been better to file a new bug report for this one, FWIW. ] > > I installed the patch below, which seems safe, but is probably > not optimal. Matthias? Wouldn't it be safer to simply disable prettification of the "diff header" when diff-buffer-type isn't equal to git? In case of the output of the command diff-buffers, I don't see what would be a usefull prettification of that header. For other cases, back in 2018 you wrote that "This has only been tested with Git's diff output." (and I extended diff--font-lock-prettify without testing other outputs as Git's). Note also that prettification was already broken with emacs 27.1. See the attached screenshot where --- # has one of its minus sign in the fringe when diff-font-lock-prettify is t. (Your patch fixed that!)