From: Tim Vaughan Date: Tue, 2 Jun 2020 21:12:59 +0000 (+0200) Subject: Added confirmation for bookmark deletion. X-Git-Tag: v2.7.10~5 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=e8c010a9f70321b2671c2cf6b4cba2db8320e319;p=elpher.git Added confirmation for bookmark deletion. --- diff --git a/elpher.el b/elpher.el index d74b655..56c5996 100644 --- a/elpher.el +++ b/elpher.el @@ -1684,7 +1684,8 @@ When run interactively HOST-OR-URL is read from the minibuffer." "Remove bookmark for the current page." (interactive) (let ((address (elpher-page-address elpher-current-page))) - (unless (elpher-address-special-p address) + (when (and (not (elpher-address-special-p address)) + (y-or-n-p "Really remove bookmark for the current page? ")) (elpher-remove-address-bookmark address) (message "Bookmark removed.")))) @@ -1693,10 +1694,11 @@ When run interactively HOST-OR-URL is read from the minibuffer." (interactive) (let ((button (button-at (point)))) (if button - (let ((page (button-get button 'elpher-page))) - (elpher-remove-address-bookmark (elpher-page-address page)) - (elpher-reload-bookmarks) - (message "Bookmark removed.")) + (when (y-or-n-p "Really remove bookmark for this link? ") + (let ((page (button-get button 'elpher-page))) + (elpher-remove-address-bookmark (elpher-page-address page)) + (elpher-reload-bookmarks) + (message "Bookmark removed."))) (error "No link selected")))) (defun elpher-bookmarks ()