Skip to content

Instantly share code, notes, and snippets.

View ElectricCoffee's full-sized avatar

Niko Lepka ElectricCoffee

View GitHub Profile
@ElectricCoffee
ElectricCoffee / gist:9387e27397a70e1a6d4d
Last active August 29, 2015 14:07 — forked from rand00/gist:e8a382e3aa1b64a53727
OSX Version of rand00's copy function
(defun copy-to-clipboard ()
(interactive)
(if (region-active-p)
(progn (shell-command-on-region
(region-beginning) (region-end)
"pbcopy")
(message "Copied region to clipboard!")
(deactivate-mark))
(message "No mark set.")))