To your comment re: not needing anonymous function, could this be:

    getSearchResults: (query, callback) ->
      $.getJSON "#{basepath}/search/#{query}?format=json&callback=?",
        callback(data)

??