fix: whitespace has a separate built-in package

It has a better hook (whitespace-cleanup) than the barebones delete-trailing-whitespace.
This commit is contained in:
Laurens Miers 2025-05-27 11:48:46 +02:00
parent adab1147e0
commit 377a5cadff

View file

@ -72,10 +72,16 @@ The audible bell is annoying AF.
(setq column-number-mode 1)
#+END_SRC
** Delete trailing whitespaces
** Whitespace cleanup
#+BEGIN_SRC emacs-lisp
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(use-package whitespace
:ensure nil
:defer t
:hook (before-save-hook . whitespace-cleanup)
;; if we wanna remove this hook at any time, eval:
;; (remove-hook 'before-save-hook #'whitespace-cleanup)
)
#+END_SRC
** Save history and recent files