From 6a17d92acc14aaf8e6842da82d84ba8405be51a4 Mon Sep 17 00:00:00 2001 From: Blendoit Date: Sun, 13 Dec 2020 18:07:05 -0800 Subject: General buffer cleanup. --- smart-documents.org | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/smart-documents.org b/smart-documents.org index 52946dd..64ec895 100644 --- a/smart-documents.org +++ b/smart-documents.org @@ -589,10 +589,17 @@ documents. Indent buffer in every mode. #+BEGIN_SRC emacs-lisp :tangle yes - (global-set-key [f12] 'sd-indent-buffer) + (global-set-key [f12] + '(lambda () + "Clean up buffer in the most general sense. + This means indenting the buffer according to the major mode in force, + as well as deleting trailing whitespaces." + (interactive) + (sd-indent-buffer) + (delete-trailing-whitespace))) #+END_SRC -*** Beautify Org mode buffer +*** TODO Beautify Org mode buffer Not only indent, but also clean up superfluous newlines. -- cgit v1.2.3