[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate 5bc3415d56 353/372: - used 'yes-or-no-p' (customi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate 5bc3415d56 353/372: - used 'yes-or-no-p' (customizable via a variable) to ask for deletion confirm. |
Date: |
Fri, 4 Feb 2022 16:59:22 -0500 (EST) |
branch: elpa/annotate
commit 5bc3415d5683894c5a6f313aa84c4083a58baca7
Author: cage <cage@invalid>
Commit: cage <cage@invalid>
- used 'yes-or-no-p' (customizable via a variable) to ask for deletion
confirm.
---
annotate.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/annotate.el b/annotate.el
index b6ad32ba5c..9811cdc924 100644
--- a/annotate.el
+++ b/annotate.el
@@ -219,6 +219,11 @@ by the newline character only) instead."
:type 'boolean
:group 'annotate)
+(defcustom annotate-y-or-n-prompt-function 'yes-or-no-p
+ "Function to be called when asking user for a yes/no question."
+ :type 'function
+ :group 'annotate)
+
(defconst annotate-prop-chain-position
'position)
@@ -289,6 +294,9 @@ annotation as defined in the database."
(defconst annotate-summary-replace-button-label "[replace]"
"The label for the button, in summary window, to replace an annotation.")
+(defconst annotate-confirm-deleting-annotation-prompt "Delete this
annotation? "
+ "The string for the prompt to be shown when asking for annotation deletion
confirm.")
+
;;;; custom errors
(define-error 'annotate-error "Annotation error")
@@ -2094,11 +2102,7 @@ This function is not part of the public API."
(defun annotate--confirm-annotation-delete ()
"Prompt user for delete confirmation.
This function is not part of the public API."
- (let ((confirm-message "Delete this annotation? [y/N] "))
- (or (not annotate-annotation-confirm-deletion)
- (string= (read-from-minibuffer (format confirm-message
- annotate-file))
- "y"))))
+ (funcall annotate-y-or-n-prompt-function
annotate-confirm-deleting-annotation-prompt))
(cl-defun annotate-delete-annotation (&optional (point (point)))
"Command to delete an annotation, `point' is the buffer
- [nongnu] elpa/annotate 26ea8e3631 266/372: - prevented getting shared value for 'annotate-file' in '%load-annotation-data'., (continued)
- [nongnu] elpa/annotate 26ea8e3631 266/372: - prevented getting shared value for 'annotate-file' in '%load-annotation-data'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate b505af0f27 300/372: - updated NEWS, Changelog and version number., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 17958167da 298/372: Merge pull request #96 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 784df37cba 313/372: - updated version number., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 9cdc2a90fb 350/372: - added prompt to confirm deletion also when deleting annotation's text;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3e0d5f39b2 302/372: Merge pull request #98 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate cb8212830d 317/372: - added feature when the customizable variable, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate ff3a0089e0 330/372: Merge pull request #102 from cage2/prevent-prompt-annotating-newline, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 1a09f78be9 322/372: - added comments to local functions of 'annotate-annotate'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 1e7bc9c886 364/372: - updated Changelog., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 5bc3415d56 353/372: - used 'yes-or-no-p' (customizable via a variable) to ask for deletion confirm.,
ELPA Syncer <=
- [nongnu] elpa/annotate eaf96d584f 349/372: - added confirmation prompt before delete an annotation., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e37820134f 332/372: - updated NEWS, Changelog and version number., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 2f4cbcdb3d 324/372: - fixed indentation., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate c737b516b8 361/372: Merge pull request #114 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f65d10ac99 008/372: improve faces, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f31eddb523 044/372: fixed bug with annotation on bol, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 32e7d85fa2 039/372: don't save files with no annotations, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e45381249f 046/372: fix bug that sometimes hid newlines, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f1ca2b15a3 043/372: add changelog to README, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 832091a37d 040/372: don't save duplicate annotations, ELPA Syncer, 2022/02/04