From: Andreas Gerler Date: Tue, 10 Feb 2026 14:45:27 +0000 (+0100) Subject: python mode trailing whitespaces X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=1b145d8f5604f0bfe5179791b85ac93218dbcdb2;p=emacsconfig.git python mode trailing whitespaces * bba.org: delete trailing whitespaces in python mode --- diff --git a/bba.org b/bba.org index efb1ff63..a29a12db 100644 --- a/bba.org +++ b/bba.org @@ -1658,6 +1658,12 @@ like these: (save-excursion (delete-trailing-whitespace)))))))) + (eval-after-load "python-mode" + '(add-hook 'python-mode-hook (lambda() (add-hook 'write-contents-functions + (lambda() + (unless (boundp 'bba-keep-whitespaces) + (save-excursion + (delete-trailing-whitespace)))))))) (eval-after-load "text-mode" '(add-hook 'text-mode-hook (lambda() (add-hook 'write-contents-functions (lambda()