GNU bug report logs - #78264
[PATCH] simple.el (delete-trailing-whitespace-mode): New minor mode

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Mon, 5 May 2025 16:03:02 UTC

Severity: normal

Tags: patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] simple.el (delete-trailing-whitespace-mode): New minor mode
Date: Mon, 05 May 2025 12:01:22 -0400
[Message part 1 (text/plain, inline)]
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'

[0001-simple.el-delete-trailing-whitespace-mode-New-minor-.patch (text/patch, attachment)]

This bug report was last modified 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.