I've pushed the first patch as cf5417f02887 "Fix whitespace eob
cleanup", removed save-match-data in da52e939aa26 "Remove redundant
`save-match-data' in whitespace.el".
​Thanks very much for this, in particular digging my mis-analysis out of a hole.