Created
March 26, 2012 15:02
-
-
Save JEG2/2205705 to your computer and use it in GitHub Desktop.
I'm trying to understand how to write a command that leaves an active region.
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 jeg2s-yank-and-select () | |
| "This is a test command for how to create a selection." | |
| (interactive) | |
| (kill-new "selected") | |
| (yank) | |
| ;; what can I replace to following with to activate the selection | |
| (exchange-point-and-mark)) | |
| (global-set-key (kbd "C-c y") 'jeg2s-yank-and-select) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment