emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/ws-butler 8c4cb5485a 28/64: Use (1- end) to hack around hi


From: Stefan Kangas
Subject: [nongnu] elpa/ws-butler 8c4cb5485a 28/64: Use (1- end) to hack around highlight-changes bug.
Date: Fri, 31 Dec 2021 11:09:29 -0500 (EST)

branch: elpa/ws-butler
commit 8c4cb5485a8cab00542dd3a94903653f61a40c7d
Author: Le Wang <le.wang@agworld.com.au>
Commit: Le Wang <le.wang@agworld.com.au>

    Use (1- end) to hack around highlight-changes bug.
    
    - fixes #7
---
 ws-butler.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ws-butler.el b/ws-butler.el
index f5eb98201e..3d30dacab4 100644
--- a/ws-butler.el
+++ b/ws-butler.el
@@ -187,7 +187,9 @@ ensure point doesn't jump due to white space trimming.
        (save-excursion
          (setq beg (progn (goto-char beg)
                           (point-at-bol))
-               end (progn (goto-char end)
+               ;; Subtract one from end to overcome Emacs bug #17784, since we
+               ;; always expand to end of line anyway, this should be OK.
+               end (progn (goto-char (1- end))
                           (point-at-eol))))
        (ws-butler-clean-region beg end)
        (setq last-end end)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]