~louis77/sourcehut.el

8c64ad2cd8c672ff93e9f6446e31d138074ad83b — Louis Brauer 3 months ago e02a732
Fix compiler warnings
1 files changed, 7 insertions(+), 7 deletions(-)

M sourcehut.el
M sourcehut.el => sourcehut.el +7 -7
@@ 26,7 26,9 @@

(defgroup sourcehut nil
  "Customize options and credentials to use Sourcehut services"
  :prefix "sourcehut")
  :prefix "sourcehut"
  :version "1"
  :group 'communication)


(defcustom sourcehut-personal-access-token ""


@@ 63,7 65,7 @@
			      ("contents" . ,content)))))))


(defun srht-paste-callback (status &rest args)
(defun srht-paste-callback () ;n(status &rest args)
  (zap-up-to-char 1 ?{)
  (let* ((obj (json-parse-buffer))
	 (user-obj (gethash "user" obj))


@@ 78,16 80,14 @@

(defun sourcehut-get-content ()
  (if (use-region-p)
      (buffer-substring-no-properties region-start region-end)
      (buffer-substring-no-properties (region-beginning) (region-end))
    (buffer-string)))


(defun sourcehut-paste-region (region-start region-end visibility filename)
(defun sourcehut-paste-region (visibility filename)
  "Paste region or buffer to paste.sr.ht"
  (interactive 
   (list (region-beginning)
	 (region-end)
	 (completing-read "Visibility: "
   (list (completing-read "Visibility: "
			  '("private" "public" "unlisted") nil t)
	 (read-string (format "Filename (default: %s): " (buffer-name))
		      nil nil (buffer-name))))