Created
March 26, 2012 16:03
-
-
Save krbullock/2206167 to your computer and use it in GitHub Desktop.
Here's a better way:
This file contains 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 jeg2s-yank-and-select () | |
"This is a test command for how to create a selection." | |
(interactive) | |
(let (deactivate-mark) | |
(kill-new "selected") | |
(yank) | |
(exchange-point-and-mark))) | |
(global-set-key (kbd "C-c y") 'jeg2s-yank-and-select) | |
; See http://www.gnu.org/software/emacs/manual/html_node/elisp/The-Mark.html#index-deactivate_002dmark-2507 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment