# File lib/guard.rb, line 100
    def setup_listener
      listener_callback = lambda do |modified, added, removed|
        ::Guard::Dsl.reevaluate_guardfile if ::Guard::Watcher.match_guardfile?(modified)

        ::Guard.within_preserved_state do
          runner.run_on_changes(modified, added, removed)
        end
      end

      listener_options = { :relative_paths => true }
      %w[latency force_polling].each do |option|
        listener_options[option.to_sym] = options[option] if options.key?(option)
      end

      @listener = Listen.to(@watchdir, listener_options).change(&listener_callback)
    end