@@ -48,6 +48,16 @@ If nil, use the Hoogle web-site."
48
48
(const :tag " hayoo" " http://hayoo.fh-wedel.de/?query=%s" )
49
49
string))
50
50
51
+ (defcustom haskell-hoogle-server-command (lambda (port )
52
+ (list " hoogle" " server"
53
+ " --local"
54
+ " -p"
55
+ (number-to-string port)))
56
+ " Command used to start the local hoogle server."
57
+ :group 'haskell
58
+ :type 'function
59
+ )
60
+
51
61
;;;### autoload
52
62
(defun haskell-hoogle (query &optional info )
53
63
" Do a Hoogle search for QUERY.
@@ -85,14 +95,14 @@ is asked to show extra info for the items matching QUERY.."
85
95
(defun haskell-hoogle-start-server ()
86
96
" Start hoogle local server."
87
97
(interactive )
88
- (if ( executable-find " hoogle" )
89
- ( unless ( haskell-hoogle-server-live-p)
90
- ( set 'haskell-hoogle-server -process
91
- ( start- process
92
- haskell-hoogle-server-process -name
93
- ( get-buffer-create haskell-hoogle-server-buffer-name )
94
- " hoogle " " server " " -p " ( number-to-string haskell-hoogle-port-number))) )
95
- ( error " \" hoogle \" executable not found " )) )
98
+ (unless (haskell- hoogle-server-live-p )
99
+ ( set ' haskell-hoogle-server-process
100
+ ( apply 'start -process
101
+ ( append ( list haskell-hoogle-server- process-name
102
+ ( get-buffer-create haskell-hoogle-server-buffer -name))
103
+ ( funcall haskell-hoogle-server-command haskell-hoogle-port-number))) )
104
+ )
105
+ )
96
106
97
107
(defun haskell-hoogle-server-live-p ()
98
108
" Whether the hoogle server process is live."
0 commit comments