diff --git a/webpaste.el b/webpaste.el index 393c5f0..100ef43 100644 --- a/webpaste.el +++ b/webpaste.el @@ -184,6 +184,12 @@ When we run out of providers to try, it will restart since (let ((text (buffer-substring (mark) (point)))) (webpaste-paste-text text))) +;;;###autoload +(defmacro webpaste-save-mark-and-excursion (&rest body) + "Wraps usage of sending BODY to ‘save-mark-and-excursion’ / ‘save-excursion’." + (if (< emacs-major-version 25) + `(save-excursion ,@body) + `(save-mark-and-excursion ,@body))) ;;;###autoload (defun webpaste-paste-buffer () @@ -195,15 +201,6 @@ When we run out of providers to try, it will restart since (goto-char (point-max)) ; Go to point-max (webpaste-paste-region))) ; Paste region - -;;;###autoload -(defmacro webpaste-save-mark-and-excursion (&rest body) - "Wraps usage of sending BODY to ‘save-mark-and-excursion’ / ‘save-excursion’." - (if (< emacs-major-version 25) - `(save-excursion ,@body) - `(save-mark-and-excursion ,@body))) - - (provide 'webpaste) ;;; webpaste.el ends here