Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added haskell-hayoo-url as a custom variable #516

Merged
merged 1 commit into from
Mar 16, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion haskell-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,14 @@ is asked to show extra info for the items matching QUERY.."
(hoogle-start-server)
(error "hoogle is not installed")))))

(defcustom haskell-hayoo-url "http://hayoo.fh-wedel.de/?query=%s"
"Default value for hayoo web site.
"
:group 'haskell
:type '(choice
(const :tag "fh-wedel.de" "http://hayoo.fh-wedel.de/?query=%s")
string))

;;;###autoload
(defun haskell-hayoo (query)
"Do a Hayoo search for QUERY."
Expand All @@ -877,7 +885,7 @@ is asked to show extra info for the items matching QUERY.."
(format "Hayoo query (default %s): " def)
"Hayoo query: ")
nil nil def))))
(browse-url (format "http://holumbus.fh-wedel.de/hayoo/hayoo.html?query=%s" query)))
(browse-url (format haskell-hayoo-url (url-hexify-string query))))

;;;###autoload
(defalias 'hayoo 'haskell-hayoo)
Expand Down