Created
December 24, 2008 07:22
-
-
Save flazz/39607 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun gist-region-or-buffer (&optional private) | |
"Post either the current region, or if mark is not set, the current buffer as a new paste at gist.github.com | |
Copies the URL into the kill ring. | |
With a prefix argument, makes a private paste." | |
(interactive "P") | |
(condition-case nil | |
(gist-region (point) (mark) private) | |
(mark-inactive (gist-buffer private)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment