From 729e277ccbbafefa61554163dcdfeb55fcb05961 Mon Sep 17 00:00:00 2001 From: Elis Axelsson Date: Fri, 7 Oct 2016 22:38:02 +0200 Subject: [PATCH] Paste to selected paste provider at the top of the list --- webpaste.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webpaste.el b/webpaste.el index c47c819..7cd34e3 100644 --- a/webpaste.el +++ b/webpaste.el @@ -132,7 +132,13 @@ return it to the user." (if (eq webpaste-tested-providers nil) (setq webpaste-tested-providers webpaste-provider-priority)) - (funcall (cdr (car webpaste-providers-alist)) text)) + ;; Get name of provider at the top of the list + (let ((provider-name (car webpaste-tested-providers))) + ;; Drop the name at the top of the list + (setq webpaste-tested-providers (cdr webpaste-tested-providers)) + + ;; Run pasting function + (funcall (cdr (assoc provider-name webpaste-providers-alist)) text))) ;;;###autoload