GNU bug report logs - #80011
[PATCH] * lisp/simple.el (delete-trailing-lines): New option

Previous Next

Package: emacs;

Reported by: Tony Zorman <mail <at> tony-zorman.com>

Date: Mon, 15 Dec 2025 08:42:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 80011 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#80011; Package emacs. (Mon, 15 Dec 2025 08:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tony Zorman <mail <at> tony-zorman.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 15 Dec 2025 08:42:02 GMT) Full text and rfc822 format available.

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

From: Tony Zorman <mail <at> tony-zorman.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] * lisp/simple.el (delete-trailing-lines): New option
Date: Mon, 15 Dec 2025 09:40:44 +0100
[Message part 1 (text/plain, inline)]
Tags: patch

Hi,

attached is a patch that adds the option
delete-trailing-whitespace-if-on-empty for use in
delete-trailing-whitespace. Quoting from the documentation:

    Delete trailing whitespace before point on an empty line.
    If this is customized to nil, trailing whitespace will not be
    deleted if it occurs right before the point on an empty line.  For
    example,
    
        int main() {
            |
        }
    
    where `|' indicates the point, calling `delete-trailing-whitespace'
    with this variable set to t (the default) results in
    
        int main() {
        |
        }
    
    whereas if this variable is set to nil `delete-trailing-whitespace'
    will not change the buffer.

I'm not entirely sure if this should be an option, an additional
argument optional to delete-trailing-whitespace, or something else
entirely (or if this is not something other people find useful at all).
Opinions welcome!

  Tony

[0001-lisp-simple.el-delete-trailing-lines-New-option.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Tony Zorman | https://tony-zorman.com

This bug report was last modified 1 day ago.

Previous Next


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