Skip to content

Instantly share code, notes, and snippets.

@sanryuu
Created December 1, 2013 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sanryuu/7734853 to your computer and use it in GitHub Desktop.
Save sanryuu/7734853 to your computer and use it in GitHub Desktop.
Emacs上でポリゴンショックします。
(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