Created
December 1, 2013 14:47
-
-
Save sanryuu/7734853 to your computer and use it in GitHub Desktop.
Emacs上でポリゴンショックします。
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
(defvar polygon-flag nil) | |
(defun polygon-shock () | |
(interactive) | |
(cond | |
(polygon-flag | |
(custom-set-faces | |
'(default ((t (:background "red" :foreground "white"))))) | |
(setq polygon-flag nil)) | |
(t | |
(custom-set-faces | |
'(default ((t (:background "blue" :foreground "white"))))) | |
(setq polygon-flag t)))) | |
(defun polygon-shock-start () | |
(interactive) | |
(setq polygon-process (run-with-timer t 0.1 'polygon-shock)) | |
(setq polygon-shock-mode t) | |
(global-set-key "\C-g" 'polygon-shock-stop)) | |
(defun polygon-shock-stop () | |
(interactive) | |
(cancel-timer polygon-process) | |
(setq polygon-shock-mode nil) | |
(global-set-key "\C-g" 'keyboard-quit) | |
(custom-set-faces | |
'(default ((t (:background "black" :foreground "white")))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment