emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/webpaste 0423f3f 024/298: Reorder file overall to have aut


From: ELPA Syncer
Subject: [nongnu] elpa/webpaste 0423f3f 024/298: Reorder file overall to have autoloads at the end
Date: Thu, 9 Dec 2021 18:59:37 -0500 (EST)

branch: elpa/webpaste
commit 0423f3f62636acb380783b9e3410ba6f3c970aaf
Author: Elis Axelsson <elis.axelsson@gmail.com>
Commit: Elis Axelsson <elis.axelsson@gmail.com>

    Reorder file overall to have autoloads at the end
    and custom vars at the beginning.
---
 webpaste.el | 89 +++++++++++++++++++++++++++++++------------------------------
 1 file changed, 45 insertions(+), 44 deletions(-)

diff --git a/webpaste.el b/webpaste.el
index 48d9b57..b96cf49 100644
--- a/webpaste.el
+++ b/webpaste.el
@@ -35,42 +35,18 @@
 (require 'request)
 
 
-;; Function we use to return the RETURNED-URL from the service
-(defun webpaste-return-url (returned-url)
-  "Return RETURNED-URL to user from the result of the paste service."
-
-  ;; Add RETURNED-URL to killring for easy pasting
-  (kill-new returned-url)
-
-  ;; Notify user
-  (message (concat "Added " returned-url " to kill ring.")))
-
-
-;;;###autoload
-(defun webpaste-paste-region ()
-  "Paste selected region to some paste service."
-  (interactive)
-
-  (let ((text (buffer-substring (mark) (point))))
-    (webpaste-paste-text text)))
-
-
-;;;###autoload
-(defun webpaste-paste-buffer ()
-  "Paste current buffer to some paste service."
-  (interactive)
-
-  (save-mark-and-excursion
-   (set-mark (point-min))               ; Set mark on point-min
-   (goto-char (point-max))              ; Go to point-max
-   (webpaste-paste-region)))            ; Paste region
-
+(defcustom webpaste-provider-priority ()
+  "Define provider priority of which providers to try in which order.
+This variable should be a list of strings and if it isn't defined it will
+default to all providers in order defined in ‘webpaste-providers’ list."
+  :group 'webpaste)
 
-;; Function to do pasting
-(defun webpaste-paste-text (text)
-  "Paste TEXT to some paste service."
 
-  (funcall (cdr (car webpaste-providers)) text))
+(defvar webpaste-tested-providers ()
+  "Variable for storing which providers to try in which order while running.
+This list will be re-populated each run based on ‘webpaste-provider-priority’ 
or
+if that variable is nil, it will use the list of names from 
‘webpaste-providers’
+each run.")
 
 
 ;;; Define providers
@@ -122,18 +98,43 @@ return it to the user."
   :group 'webpaste)
 
 
-(defcustom webpaste-provider-priority ()
-  "Define provider priority of which providers to try in which order.
-This variable should be a list of strings and if it isn't defined it will
-default to all providers in order defined in ‘webpaste-providers’ list."
-  :group 'webpaste)
+;; Function we use to return the RETURNED-URL from the service
+(defun webpaste-return-url (returned-url)
+  "Return RETURNED-URL to user from the result of the paste service."
 
+  ;; Add RETURNED-URL to killring for easy pasting
+  (kill-new returned-url)
+
+  ;; Notify user
+  (message (concat "Added " returned-url " to kill ring.")))
+
+
+;; Function to do pasting
+(defun webpaste-paste-text (text)
+  "Paste TEXT to some paste service."
+
+  (funcall (cdr (car webpaste-providers)) text))
+
+
+;;;###autoload
+(defun webpaste-paste-region ()
+  "Paste selected region to some paste service."
+  (interactive)
+
+  (let ((text (buffer-substring (mark) (point))))
+    (webpaste-paste-text text)))
+
+
+;;;###autoload
+(defun webpaste-paste-buffer ()
+  "Paste current buffer to some paste service."
+  (interactive)
+
+  (save-mark-and-excursion
+   (set-mark (point-min))               ; Set mark on point-min
+   (goto-char (point-max))              ; Go to point-max
+   (webpaste-paste-region)))            ; Paste region
 
-(defvar webpaste-tested-providers ()
-  "Variable for storing which providers to try in which order while running.
-This list will be re-populated each run based on ‘webpaste-provider-priority’ 
or
-if that variable is nil, it will use the list of names from 
‘webpaste-providers’
-each run.")
 
 
 (provide 'webpaste)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]