Skip to content
This repository
Browse code

Merge commit 'd9871f84d2a292d41fe11dcadbb4054131a3ae75' into maint

  • Loading branch information...
commit 995344e8107b675716632641512cc2efbcbdadc0 2 parents 94307af + d9871f8
Yann Hodique authored February 25, 2012

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  gist.el
4  gist.el
@@ -105,7 +105,7 @@ accepts additional POST `params' as a list of (key . value) conses."
105 105
       (url-retrieve url callback))))
106 106
 
107 107
 ;;;###autoload
108  
-(defun gist-region (begin end &optional private &optional callback)
  108
+(defun gist-region (begin end &optional private callback)
109 109
   "Post the current region as a new paste at gist.github.com
110 110
 Copies the URL into the kill ring.
111 111
 
@@ -116,6 +116,8 @@ With a prefix argument, makes a private paste."
116 116
          (ext (or (cdr (assoc major-mode gist-supported-modes-alist))
117 117
                   (file-name-extension file)
118 118
                   "txt")))
  119
+    (unless (string-match (concat "\\." ext) name)
  120
+      (setq name (concat name "." ext)))
119 121
     (gist-request
120 122
      (format "https://%s@gist.github.com/gists"
121 123
              (or (car (github-auth-info)) ""))

0 notes on commit 995344e

Please sign in to comment.
Something went wrong with that request. Please try again.