Created
August 28, 2014 14:59
-
-
Save nabinno/baf7143f9469d4f32057 to your computer and use it in GitHub Desktop.
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
(global-set-key "\C-cw" 'cb-copy) | |
(global-set-key "\C-cy" 'cb-paste) | |
(defun cb-copy () | |
(interactive) | |
(let ((coding-system-for-write 'shift_jis-dos)) | |
(shell-command-on-region (region-beginning) (region-end) "cat > /dev/clipboard" nil nil nil)) | |
(message "")) | |
(defun cb-paste () | |
(interactive) | |
(let ((coding-system-for-read 'shift_jis-dos)) | |
(goto-char | |
(+ (point) (cadr (insert-file-contents "/dev/clipboard")))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment