Created
July 26, 2010 16:08
-
-
Save lamdor/490757 to your computer and use it in GitHub Desktop.
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
| require 'autotest/fsevent' | |
| require 'autotest/growl' | |
| module Autotest::Emacs | |
| @@client_cmd = 'emacsclient -e' | |
| def self.command= o | |
| @@client_cmd = o | |
| end | |
| def self.emacs_autotest status | |
| `#{@@client_cmd} \"(autotest-update '#{status})\"` | |
| end | |
| def self.register_hooks | |
| Autotest.add_hook :run_command do |at| | |
| emacs_autotest :running | |
| end | |
| Autotest.add_hook :green do |at| | |
| emacs_autotest :passed | |
| end | |
| Autotest.add_hook :all_good do |at| | |
| emacs_autotest :passed | |
| end | |
| Autotest.add_hook :red do |at| | |
| emacs_autotest :failed | |
| end | |
| Autotest.add_hook :quit do |at| | |
| emacs_autotest :quit | |
| end | |
| end | |
| end | |
| Autotest::Emacs.register_hooks if ENV['INSIDE_EMACS'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment