Created
September 13, 2012 00:21
-
-
Save gongo/3710951 to your computer and use it in GitHub Desktop.
byte-compile-file 中に山田を踊らせようとしたが、踊ってくれない
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 yamada-compile-file (filename &optional load) | |
(interactive | |
(let ((file buffer-file-name) | |
(file-name nil) | |
(file-dir nil)) | |
(and file | |
(derived-mode-p 'emacs-lisp-mode) | |
(setq file-name (file-name-nondirectory file) | |
file-dir (file-name-directory file))) | |
(list (read-file-name (if current-prefix-arg | |
"Byte compile and load file: " | |
"Byte compile file: ") | |
file-dir file-name nil) | |
current-prefix-arg))) | |
(lexical-let | |
((bytecomp-finish? nil) | |
(filename filename) | |
(load load)) | |
(deferred:$ | |
(deferred:parallel | |
(deferred:lambda () | |
(yamada-show) ;; dancing yamada | |
(when (not bytecomp-finish?) | |
(deferred:next self)))) | |
(deferred:$ | |
(deferred:next | |
(lambda (x) (byte-compile-file filename load))) | |
(deferred:nextc it | |
(lambda (x) (setq bytecomp-finish? t) nil))) | |
(deferred:nextc it | |
(lambda (results) (message "finish")))))) | |
;; (deferred:next | |
;; (lambda (x) (byte-compile-file filename load))) | |
;; | |
;; で emacs が気合い入る所為か、(yamada-show) が動かない(静止状態) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(yamada-show)
の部分を(message "aaa")
にして、js2-mode に対して実行すると