From f0a36e24cab482e3f33a9a70103f600b478f9c79 Mon Sep 17 00:00:00 2001 From: Elis Axelsson Date: Wed, 10 May 2017 19:52:47 +0200 Subject: [PATCH] Added some docs of how to enable the confirmation dialog before pasting --- README.org | 14 ++++++++++++++ webpaste.el | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index 49f7649..af83fff 100644 --- a/README.org +++ b/README.org @@ -54,6 +54,20 @@ This can be added to the =:config= section of use-package: (setq webpaste-provider-priority '("ptpb.pw" "dpaste.de")))) #+END_SRC +*** Confirm pasting with a yes/no confirmation before pasting +To enable a confirmation dialog to always pop up and require you to confirm +pasting before text is actually sent to a paste-provider you just need to set +the variable =webpaste/paste-confirmation= to a value that is non-nil. + +Example: +#+begin_src emacs-lisp :tangle yes + ;; Require confirmation before doing paste + (setq webpaste/paste-confirmation t) +#+end_src + +Can also be put in the =:config= section of =use-package= the same way as the +provider definitions above. + ** TODO Providers to implement [6/9] - [X] ptpb.pw - [X] ix.io diff --git a/webpaste.el b/webpaste.el index 2d303ed..0fd17ec 100644 --- a/webpaste.el +++ b/webpaste.el @@ -68,9 +68,9 @@ default to all providers in order defined in ‘webpaste-providers’ list." :type '(alist :key-type symbol :value-type string) :group 'webpaste) + (defcustom webpaste/paste-confirmation nil - "Prompt for a yes/no confirmation before attempting to paste a region or -buffer" + "Prompt for a yes/no confirmation before attempting to paste a region or buffer." :group 'webpaste)