[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate f33eecba7b 362/372: - prevented asking to delete
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate f33eecba7b 362/372: - prevented asking to delete a database that does not actually exists |
Date: |
Fri, 4 Feb 2022 16:59:23 -0500 (EST) |
branch: elpa/annotate
commit f33eecba7bed92fd84145d0b473c52d417690c95
Author: cage <cage@invalid>
Commit: cage <cage@invalid>
- prevented asking to delete a database that does not actually exists
on the file system;
- marked as modified the buffer when an annotation is deleted.
---
annotate.el | 32 +++++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/annotate.el b/annotate.el
index cac2992623..ff17a77a37 100644
--- a/annotate.el
+++ b/annotate.el
@@ -1584,19 +1584,21 @@ annotation."
(defun annotate-dump-annotation-data (data &optional save-empty-db)
"Save `data' into annotation file."
- (if (or save-empty-db
- data)
- (with-temp-file annotate-file
- (let* ((print-length nil)
- (%abbreviate-filename (lambda (record)
- (let ((full-filename
(annotate-filename-from-dump record))
- (annotations
(annotate-annotations-from-dump record))
- (file-checksum
(annotate-checksum-from-dump record)))
- (annotate-make-record
(abbreviate-file-name full-filename)
- annotations
-
file-checksum))))
- (actual-data (mapcar %abbreviate-filename data)))
- (prin1 actual-data (current-buffer))))
+ (cond
+ ((or save-empty-db
+ data)
+ (with-temp-file annotate-file
+ (let* ((print-length nil)
+ (%abbreviate-filename (lambda (record)
+ (let ((full-filename
(annotate-filename-from-dump record))
+ (annotations
(annotate-annotations-from-dump record))
+ (file-checksum
(annotate-checksum-from-dump record)))
+ (annotate-make-record
(abbreviate-file-name full-filename)
+ annotations
+ file-checksum))))
+ (actual-data (mapcar %abbreviate-filename data)))
+ (prin1 actual-data (current-buffer)))))
+ ((file-exists-p annotate-file)
(let* ((confirm-message "Delete annotations database file %S? [y/N] ")
(delete-confirmed-p (or (not annotate-database-confirm-deletion)
(string= (read-from-minibuffer (format
confirm-message
@@ -1607,7 +1609,7 @@ annotation."
(delete-file annotate-file t)
(error (message "error removing annotation database: %S"
(error-message-string err))))
- (annotate-dump-annotation-data data t)))))
+ (annotate-dump-annotation-data data t))))))
(cl-defmacro with-matching-annotation-fns ((filename
beginning
@@ -2108,7 +2110,7 @@ point)."
(when-let ((annotation (annotate-annotation-at point)))
(let* ((delete-confirmed-p (annotate--confirm-annotation-delete)))
(when delete-confirmed-p
- (annotate--delete-annotation-chain-prevent-modification annotation)))))
+ (annotate--delete-annotation-chain annotation)))))
(defun annotate-change-annotation (pos)
"Change annotation at point. If empty, delete annotation."
- [nongnu] elpa/annotate 44ac24f63d 274/372: Merge pull request #87 from cage2/overwrite-annotations, (continued)
- [nongnu] elpa/annotate 44ac24f63d 274/372: Merge pull request #87 from cage2/overwrite-annotations, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 8b06586497 282/372: - fixed integration of multiline annotated text., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 485060813b 277/372: - added procedures to pad multiline annotation text., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e004ae7e97 281/372: - updated version;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3e5d14fde8 287/372: - updated documentation., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 6415fb6111 294/372: - updated NEWS and CHANGELOG;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 4890d2d2a2 295/372: Merge pull request #95 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 85d7c87e08 293/372: - added padding also for notes placed on the margin of the window., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate ac55086d60 301/372: - fixed typo., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3415b7ac08 321/372: - changed behaviour when user is annotation a newline character;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f33eecba7b 362/372: - prevented asking to delete a database that does not actually exists,
ELPA Syncer <=
- [nongnu] elpa/annotate 1350e1d073 338/372: - fixed annotated text shown in the summary window, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3e3c1b1066 368/372: - fixed function name;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a484ffa0b6 319/372: - allowed removing (or cutting) annotations when buffer is in read-only mode., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 936389e36a 316/372: - prevented asking for annotation when trying to annotate a newline character., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 36d3729c27 339/372: - updated version number and docs., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a8762cd08a 344/372: - removed garbage at the end of an error message., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 9aba6305fe 342/372: Merge pull request #109 from cage2/fix-replace-button, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate bd12129213 333/372: Merge pull request #106 from cage2/fixed-call-comment-region, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 83e81e0979 369/372: - added missing docstrings and improved a bit the old ones., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f5436b2bff 366/372: - added helper functions to manage annotation's interval and 'annotate-db-merge-annotations'., ELPA Syncer, 2022/02/04