Hello, the following patch extends whitespace.el with the ability to specify styles and actions on a file or mode specific basis. The rationale is that the current unique style and action settings are not sufficient. You may not want to see the exact same whitespace problems in all files or major modes, and you also may not want the same actions to be undertaken everywhere. To make this work, some new user options are introduced (which see): whitespace-file-style, whitespace-mode-style and their action counterpart. When computing the style to use for a specific file, whitespace now looks for a match on the file name, then on the major mode, and then falls back to the global setting. Same thing for actions.