I noticed that whitespace-mode was not correctly diagnosing whitespace problems in some files.

On investigation, this was because whitespace-report-region didn't call whitespace-ensure-local-variables, so it didn't catch changes to indent-tabs-mode in file-find hook functions.

However, on further investigation, I can't see why these local variables are needed. Currently, whitespace-mode makes buffer-local copies of indent-tabs-mode and tab-width, with names prefixed by "whitespace-". But these variables are buffer-local if necessary already, and whitespace-mode never tries to change them.

Hence, I attach a patch for review which simply removes these (apparently unnecessary) local variables.

--
http://rrt.sc3d.org