|
1 | | -;;; haskell-hoogle.el --- Look up Haskell documentation via hoogle or hayoo -*- lexical-binding: t; -*- |
| 1 | +;;; haskell-hoogle.el --- Look up Haskell documentation via hoogle -*- lexical-binding: t; -*- |
2 | 2 |
|
3 | 3 | ;; Copyright © 2015 Steve Purcell |
4 | 4 | ;; 2016 Arthur Fayzrakhmanov |
|
21 | 21 |
|
22 | 22 | ;;; Commentary: |
23 | 23 |
|
24 | | -;; Functions for looking up documentation with hayoo or hoogle, via |
| 24 | +;; Functions for looking up documentation with hoogle, via |
25 | 25 | ;; either local or remote servers. |
26 | 26 |
|
27 | 27 | ;;; Code: |
|
30 | 30 | (require 'haskell-mode) |
31 | 31 | (require 'haskell-utils) |
32 | 32 |
|
33 | | -(defun hoogle-prompt (&optional hayoo?) |
| 33 | +(defun hoogle-prompt () |
34 | 34 | "Prompt for Hoogle query." |
35 | | - (let ((def (haskell-ident-at-point)) |
36 | | - (hoogle-or-hayoo "Hoogle")) |
| 35 | + (let ((def (haskell-ident-at-point))) |
37 | 36 | (if (and def (symbolp def)) (setq def (symbol-name def))) |
38 | | - (if hayoo? (setq hoogle-or-hayoo "Hayoo")) |
39 | 37 | (list (read-string (if def |
40 | | - (format "%s query (default %s): " hoogle-or-hayoo def) |
41 | | - (format "%s query: " hoogle-or-hayoo)) |
| 38 | + (format "Hoogle query (default %s): " def) |
| 39 | + "Hoogle query: ") |
42 | 40 | nil nil def) |
43 | 41 | ))) |
44 | 42 |
|
@@ -67,7 +65,6 @@ is asked to show extra info for the items matching QUERY.." |
67 | 65 | :type '(choice |
68 | 66 | (const :tag "haskell-org" "https://hoogle.haskell.org/?hoogle=%s") |
69 | 67 | (const :tag "fp-complete" "https://www.stackage.org/lts/hoogle?q=%s") |
70 | | - (const :tag "hayoo" "http://hayoo.fh-wedel.de/?query=%s") |
71 | 68 | string)) |
72 | 69 |
|
73 | 70 | ;;;###autoload |
@@ -130,25 +127,5 @@ is asked to show extra info for the items matching QUERY.." |
130 | 127 | (haskell-hoogle-start-server)) |
131 | 128 | (haskell-mode-toggle-interactive-prompt-state t)))) |
132 | 129 |
|
133 | | - |
134 | | -(defcustom haskell-hayoo-url "http://hayoo.fh-wedel.de/?query=%s" |
135 | | - "Default value for hayoo web site." |
136 | | - :group 'haskell |
137 | | - :type '(choice |
138 | | - (const :tag "fh-wedel.de" "http://hayoo.fh-wedel.de/?query=%s") |
139 | | - string)) |
140 | | - |
141 | | -;;;###autoload |
142 | | -(defun haskell-hayoo (query) |
143 | | - "Do a Hayoo search for QUERY." |
144 | | - (interactive (hoogle-prompt t)) |
145 | | - (browse-url (format haskell-hayoo-url (url-hexify-string query)))) |
146 | | - |
147 | | -;;;###autoload |
148 | | -(defalias 'hayoo 'haskell-hayoo) |
149 | | - |
150 | | - |
151 | | - |
152 | | - |
153 | 130 | (provide 'haskell-hoogle) |
154 | 131 | ;;; haskell-hoogle.el ends here |
0 commit comments