Skip to content

Instantly share code, notes, and snippets.

@ivey
Created October 6, 2008 01:56
Show Gist options
  • Save ivey/14975 to your computer and use it in GitHub Desktop.
Save ivey/14975 to your computer and use it in GitHub Desktop.
(defun gist-region-or-buffer ()
"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."
(interactive)
(condition-case nil
(gist-region (point) (mark))
(mark-inactive (gist-buffer))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment