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?"