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

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

[nongnu] elpa/annotate eaffc1eba1 185/372: - mark buffer as modified eve


From: ELPA Syncer
Subject: [nongnu] elpa/annotate eaffc1eba1 185/372: - mark buffer as modified even if the only action the user performed
Date: Fri, 4 Feb 2022 16:58:57 -0500 (EST)

branch: elpa/annotate
commit eaffc1eba117f8c9f05e7c907ed798ee83d5f8a5
Author: cage <cage-invalid@invalid>
Commit: cage <cage-invalid@invalid>

    - mark buffer as  modified even if the only action  the user performed
      was clearing annotation  (and at least an annotation  was present in
      the file).
---
 annotate.el | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/annotate.el b/annotate.el
index f7e27e9ee6..911b0c86e9 100644
--- a/annotate.el
+++ b/annotate.el
@@ -1275,19 +1275,18 @@ annotation."
 (defun annotate-clear-annotations ()
   "Clear all current annotations."
   (interactive)
-  (let ((overlays
-         (overlays-in 0 (buffer-size)))
-        (modified-p (buffer-modified-p)))
+  (let ((overlays   (overlays-in 0 (buffer-size)))
+        (modifiedp (buffer-modified-p)))
     ;; only remove annotations, not all overlays
     (setq overlays (cl-remove-if
                     (lambda (ov) (not (annotationp ov)))
                     overlays))
     (dolist (ov overlays)
-      (annotate--remove-annotation-property
-       (overlay-start ov)
-       (overlay-end ov))
-      (delete-overlay ov))
-    (set-buffer-modified-p modified-p)))
+      (annotate--remove-annotation-property (overlay-start ov)
+                                            (overlay-end ov))
+      (delete-overlay ov)
+      (setf modifiedp t)
+    (set-buffer-modified-p modifiedp))))
 
 (defun annotate-string-empty-p (a)
   "Is the arg an empty string or null?"



reply via email to

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