Version 1.3 of package Ws-Butler has just been released in NonGNU ELPA. You can now find it in M-x list-packages RET.
Ws-Butler describes itself as: ======================================== Unobtrusively remove trailing whitespace ======================================== More at https://elpa.nongnu.org/nongnu/ws-butler.html ## Summary: [](http://travis-ci.org/lewang/ws-butler) [](https://elpa.nongnu.org/nongnu/ws-butler.html) ## ws-butler -- an unobtrusive way to trim spaces from end of line - Only lines touched get trimmed. If the white space at end of buffer is changed, then blank lines at the end of buffer are truncated respecting `require-final-newline`. - Trimming only happens when saving. ## What does unobtrusive mean? The user is not made explicitly aware when trimming happens. You keep working and the butler takes care of whitespace for you. ## Recent NEWS: Ver 1.3 2025/03/10 Sean Whitton Replace a use of `always' to retain compatibility with older Emacs. Thanks to Chris Rayner for the reporting the problem. Ver 1.2 2025/02/25 Sean Whitton When `special-mode' is in `ws-butler-global-exempt-modes', also check whether a mode has a `mode-class' of `special', and don't activate `ws-butler-mode' if it does. Remove entries from `ws-butler-global-exempt-modes' that the preceding changes renders redundant. Exempt `org-agenda-mode' from `ws-butler-global-mode' by default. Ver 1.1 2025/02/21 Sean Whitton Exempt `compilation-mode' from `ws-butler-global-mode' by default. Clarify docstring of `ws-butler-global-exempt-modes'. Ver 1.0 2025/02/18 Sean Whitton Take over maintenance; maintain out of nongnu-elpa.git. Bump to version 1.0: core functionality not expected to change. Move customisation group from `convenience' to `text'. Rewrite docstrings. Fix accidental change `point-at-bol'->`line-end-position'. Exempt `message-mode' from `ws-butler-global-mode' by default. Other tidying.