Created
December 6, 2012 07:47
-
-
Save Johniel/4222607 to your computer and use it in GitHub Desktop.
@yutoppはリンカ作成に失敗しました。
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 sort-lines-random (beg end) | |
"Sort lines in region randomly." | |
(interactive "r") | |
(save-excursion | |
(save-restriction | |
(narrow-to-region beg end) | |
(goto-char (point-min)) | |
(let ;; To make `end-of-line' and etc. to ignore fields. | |
((inhibit-field-text-motion t)) | |
(sort-subr nil 'forward-line 'end-of-line nil nil | |
(lambda (s1 s2) (eq (random 2) 0))))))) | |
(defun ytl-moushiwake-of-the-world () | |
(interactive) | |
(sort-lines-random (point-min) (point-max)) | |
(message "リンカ作れませんでしたJP. 申し訳 of the world.")) | |
(defun ytl-define-moushiwake-key (c) | |
(global-set-key (read-kbd-macro (concat "C-" (string c))) 'ytl-moushiwake-of-the-world) | |
(global-set-key (read-kbd-macro (concat "M-" (string c))) 'ytl-moushiwake-of-the-world) | |
(global-set-key (read-kbd-macro (concat "C-M-" (string c))) 'ytl-moushiwake-of-the-world)) | |
(defun ytl-make-linker () | |
(interactive) | |
(loop for c from ?0 to ?9 do (ytl-define-moushiwake-key c)) | |
(loop for c from ?A to ?Z do (ytl-define-moushiwake-key c)) | |
(loop for c from ?a to ?z do (ytl-define-moushiwake-key c))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment