Tags: patch While (add-hook 'before-save-hook #'delete-trailing-whitespace nil t) is simple enough to put into one's init file, it's a bit rough around the edges (e.g. for read-only buffers, or interaction with editorconfig). So I suggest we add a simple `delete-trailing-whitespace-mode` minor mode. Comments? Objections? Stefan In GNU Emacs 31.0.50 (build 1, i686-pc-linux-gnu, GTK+ Version 3.24.49, cairo version 1.18.4) of 2025-05-01 built on alfajor Repository revision: 3555aa795435c6c150e9291386cb776acd35e564 Repository branch: work Windowing system distributor 'The X.Org Foundation', version 11.0.12101016 System Description: Debian GNU/Linux trixie/sid Configured using: 'configure -C --enable-checking --enable-check-lisp-object-type --with-modules --with-cairo --with-tiff=ifavailable 'CFLAGS=-Wall -g3 -Og -Wno-pointer-sign' PKG_CONFIG_PATH=/home/monnier/lib/pkgconfig'