[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate abe23338cb 235/372: - ensured that the modified s
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate abe23338cb 235/372: - ensured that the modified status of as buffer is not modified by the local |
Date: |
Fri, 4 Feb 2022 16:59:03 -0500 (EST) |
branch: elpa/annotate
commit abe23338cbe4994e56c1c63a89fa901df5cbdd85
Author: cage <cage-invalid@invalid>
Commit: cage <cage-invalid@invalid>
- ensured that the modified status of as buffer is not modified by the local
function 'delete' in 'annotate-change-annotation'.
---
annotate.el | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/annotate.el b/annotate.el
index a176abcf9e..d57a8c69a7 100644
--- a/annotate.el
+++ b/annotate.el
@@ -278,6 +278,14 @@ annotation as defined in the database."
,@body)
(setf inhibit-modification-hooks ,old-mode)))))
+(cl-defmacro annotate-with-restore-modified-bit (&rest body)
+ "Save the value of `buffer-modified-p' before `body' is exectuted
+ and restore the saved value just after the end of `body'."
+ (let ((modifiedp (gensym)))
+ `(let ((,modifiedp (buffer-modified-p)))
+ ,@body
+ (set-buffer-modified-p modifiedp))))
+
(defun annotate-end-of-line-pos ()
"Get the position of the end of line and rewind the point's
position (so that it is unchanged after this function is called)."
@@ -1320,7 +1328,7 @@ annotation."
(overlay-end ov))
(delete-overlay ov)
(setf modifiedp t)
- (set-buffer-modified-p modifiedp))))
+ (set-buffer-modified-p modifiedp))))
(defun annotate-string-empty-p (a)
"Is the arg an empty string or null?"
@@ -1593,13 +1601,14 @@ The searched interval can be customized setting the
variable:
(annotation-text (read-from-minibuffer annotate-annotation-prompt
(overlay-get highlight
'annotation))))
(cl-labels ((delete (annotation)
- (let ((chain (annotate-find-chain annotation)))
- (dolist (single-element chain)
- (goto-char (overlay-end single-element))
- (move-end-of-line nil)
+ (let ((chain (annotate-find-chain annotation)))
+ (annotate-with-restore-modified-bit
+ (dolist (single-element chain)
+ (goto-char (overlay-end single-element))
+ (move-end-of-line nil)
(annotate--remove-annotation-property (overlay-start
single-element)
(overlay-end
single-element))
- (delete-overlay single-element))))
+ (delete-overlay single-element)))))
(change (annotation)
(let ((chain (annotate-find-chain annotation)))
(dolist (single-element chain)
- [nongnu] elpa/annotate 2dabb8d886 196/372: Merge branch 'master' into rethink-multiline-annotations, (continued)
- [nongnu] elpa/annotate 2dabb8d886 196/372: Merge branch 'master' into rethink-multiline-annotations, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e1a0917d98 197/372: - fixed 'annotate-previous-annotation-ends' and 'annotate-next-annotation-ends', ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e7ca823566 201/372: Merge branch 'master' into org-mode-fix, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 2cf1a0b6d2 199/372: Merge branch 'master' into rethink-multiline-annotations, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 818f66f4a3 203/372: Merge pull request #58 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate de116813be 211/372: Merge branch 'master' into rethink-multiline-annotations, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 30f639c524 212/372: - fixed return value of 'maybe-force-newline-policy'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate ece50f65fe 220/372: - fixed managing return value of "(get-text-property changed-face-pos 'face)", ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate b25fb1ccab 224/372: - Increased version to 0.7.0., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a6097f6326 237/372: - updated NEWS, Changelog and version., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate abe23338cb 235/372: - ensured that the modified status of as buffer is not modified by the local,
ELPA Syncer <=
- [nongnu] elpa/annotate 8481eaf0c2 245/372: - signalled an error when annotating a region and it overlaps with an existing annotation., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate dadc57bb3e 231/372: - reverted the version number to 0.8.0;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a02755056e 244/372: - changed occurrence of 'annotate-load-annotation-data' to 'annotate-load-annotation-data-ignore-errors'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4e23850efa 233/372: - Added file argument 'database-file-path' to 'annotate-switch-db';, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 2687e123cd 243/372: - added signalling 'annotate-load-annotation-data' to:, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 13c4fcbc4f 250/372: - made 'annotate-load-annotation-data-ignore-errors' ignore all errors;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4cc32fc2fb 256/372: Merge pull request #78 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 6543d3b1c0 259/372: - fixed indentation., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 8ec9e0ea37 253/372: - increased version., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate c42686bab5 271/372: - allow overwriting (even partial) of annotations., ELPA Syncer, 2022/02/04