Merge branch 'naclander-master'

master
Elis Axelsson 9 years ago
commit af0474eceb
No known key found for this signature in database
GPG Key ID: D57EFA625C9A925F
  1. 15
      webpaste.el

@ -68,6 +68,11 @@ 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"
:group 'webpaste)
(defvar webpaste/tested-providers ()
"Variable for storing which providers to try in which order while running.
@ -372,8 +377,11 @@ Argument POINT Current point.
Argument MARK Current mark."
(interactive "r")
;; unless we wanted a paste confirmation and declined
(unless (and webpaste/paste-confirmation
(not (yes-or-no-p "paste entire region?")))
;; Extract the buffer contents with buffer-substring and paste it
(webpaste-paste-text (buffer-substring point mark)))
(webpaste-paste-text (buffer-substring point mark))))
;;;###autoload
@ -381,8 +389,11 @@ Argument MARK Current mark."
"Paste current buffer to some paste service."
(interactive)
;; unless we wanted a paste confirmation and declined
(unless (and webpaste/paste-confirmation
(not (yes-or-no-p "paste entire buffer?")))
;; Extract the buffer contents with buffer-substring and paste it
(webpaste-paste-text (buffer-substring (point-min) (point-max))))
(webpaste-paste-text (buffer-substring (point-min) (point-max)))))

Loading…
Cancel
Save