Skip to content

Instantly share code, notes, and snippets.

@asummers
Last active October 6, 2016 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asummers/7784d40b1bc53ee309777274e9d10997 to your computer and use it in GitHub Desktop.
Save asummers/7784d40b1bc53ee309777274e9d10997 to your computer and use it in GitHub Desktop.
(defadvice kill-ring-save (before slick-copy activate compile)
"When called interactively with no active region, copy a single line instead."
(interactive
(if mark-active
(list (region-beginning) (region-end))
(message "Copied line")
(list (line-beginning-position) (line-beginning-position 2)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment