diff options
-rw-r--r-- | sx-interaction.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sx-interaction.el b/sx-interaction.el index d2129f8..368da09 100644 --- a/sx-interaction.el +++ b/sx-interaction.el @@ -278,11 +278,16 @@ guessed from context at point. With UNDO prefix argument, undelete instead." (interactive (list (sx--error-if-unread (sx--data-here)) current-prefix-arg)) - (sx-method-post-from-data data (if undo 'delete/undo 'delete)) - ;; Indicate to ourselves this has been deleted. - (setcdr data (cons (car data) (cdr data))) - (setcar data 'deleted) - (sx--maybe-update-display)) + (when (y-or-n-p (format "DELETE this %s? " + (let-alist data + (cond (.comment_id "comment") + (.answer_id "answer") + (.question_id "question"))))) + (sx-method-post-from-data data (if undo 'delete/undo 'delete)) + ;; Indicate to ourselves this has been deleted. + (setcdr data (cons (car data) (cdr data))) + (setcar data 'deleted) + (sx--maybe-update-display))) ;;; Commenting |