Permalink
Browse files

Merge commit 'd9871f84d2a292d41fe11dcadbb4054131a3ae75' into maint

  • Loading branch information...
sigma committed Feb 25, 2012
2 parents 94307af + d9871f8 commit 995344e8107b675716632641512cc2efbcbdadc0
Showing with 3 additions and 1 deletion.
  1. +3 −1 gist.el
View
@@ -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.
@@ -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)) ""))

0 comments on commit 995344e

Please sign in to comment.