branch: elpa/ws-butler
commit a998a23ee8713808ac1fe3d1523ea1861be4da57
Author: Le Wang <[email protected]>
Commit: Le Wang <[email protected]>
Clarify ws-butler-keep-whitespace-before-point docs.
---
README.md | 6 ++++++
ws-butler.el | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 776f1efff3..7b6057d8c7 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,12 @@ and the butler takes care of whitespace for you.
This means if point is at a location that was trimmed, point is not moved, but
the data on disk has been cleaned up (revert the buffer to confirm).
+### Not moving point because of space deletion.
+
+By default, ws-butler preserves "virtual spaces" in front of point if
necessary. The file on disk is cleaned up however.
+
+This can be disabled with `ws-butler-keep-whitespace-before-point`.
+
## History
1. I started by trimming all spaces at EOL in source code in a
diff --git a/ws-butler.el b/ws-butler.el
index f500ebe25d..93f52524f3 100644
--- a/ws-butler.el
+++ b/ws-butler.el
@@ -64,10 +64,10 @@
t
"Keep whitespace at current point after save.
-This is particularly to preserve indentation.
+That is to say, if whitespace around is trimmed, perform the
+cleanup only on disk, don't move the point in the buffer.
-N.B. The spaces are removed in the file on disk. So in a sense
-only the \"virtual\" space is preserved in the buffer."
+i.e. only the \"virtual\" space is preserved in the buffer."
:type 'boolean
:group 'ws-butler)