From a1083eec5c7ee47cfae33f82d5ae7b75430c8da1 Mon Sep 17 00:00:00 2001 From: sathlan Date: Sun, 11 Dec 2011 14:59:12 +0000 Subject: [PATCH 1/2] Have colors even if buffer have the right major but not the right extension. --- gist.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gist.el b/gist.el index 37a21c4..2b9abba 100644 --- a/gist.el +++ b/gist.el @@ -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 "https://gist.github.com/gists" (or callback 'gist-created-callback) From d9871f84d2a292d41fe11dcadbb4054131a3ae75 Mon Sep 17 00:00:00 2001 From: sathlan Date: Sun, 11 Dec 2011 15:27:39 +0000 Subject: [PATCH 2/2] Double callback and edebug are not happy together. --- gist.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gist.el b/gist.el index 2b9abba..290c222 100644 --- a/gist.el +++ b/gist.el @@ -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.