summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlendoit <blendoit@gmail.com>2020-12-13 18:07:05 -0800
committerBlendoit <blendoit@gmail.com>2020-12-13 18:07:05 -0800
commit6a17d92acc14aaf8e6842da82d84ba8405be51a4 (patch)
tree478185356fc3d039191b567699405a3849cee4ca
parentfe8186741a8f91b9ba671314dd1380de8e19f405 (diff)
General buffer cleanup.
-rw-r--r--smart-documents.org11
1 files 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.
Copyright 2019--2024 Marius PETER