Skip to content

Commit

Permalink
Merge commit 'd9871f84d2a292d41fe11dcadbb4054131a3ae75' into maint
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma committed Feb 25, 2012
2 parents 94307af + d9871f8 commit 995344e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gist.el
Expand Up @@ -105,7 +105,7 @@ accepts additional POST `params' as a list of (key . value) conses."
(url-retrieve url callback))))

;;;###autoload
(defun gist-region (begin end &optional private &optional callback)
(defun gist-region (begin end &optional private callback)
"Post the current region as a new paste at gist.github.com
Copies the URL into the kill ring.
Expand All @@ -116,6 +116,8 @@ With a prefix argument, makes a private paste."
(ext (or (cdr (assoc major-mode gist-supported-modes-alist))
(file-name-extension file)
"txt")))
(unless (string-match (concat "\\." ext) name)
(setq name (concat name "." ext)))
(gist-request
(format "https://%s@gist.github.com/gists"
(or (car (github-auth-info)) ""))
Expand Down

0 comments on commit 995344e

Please sign in to comment.