@@ -165,13 +165,13 @@ association lists and count on HIE to use default values there."
165
165
166
166
(defun hie-get-context (context )
167
167
(let ((start (save-excursion (if (use-region-p ) (goto-char (region-beginning )))
168
- ( list (line-number-at-pos ) ( current-column ))))
168
+ `(( " line " . , (line-number-at-pos )) ( " col " . ,( current-column ) ))))
169
169
(end (save-excursion (if (use-region-p ) (goto-char (region-end )))
170
- ( list (line-number-at-pos ) ( current-column ))))
170
+ `(( " line " . , (line-number-at-pos )) ( " col " . ,( current-column ) ))))
171
171
(filename (buffer-file-name )))
172
172
`((" file" . ((" file" . , filename )))
173
- (" start_pos" . (( " pos " . ,( apply 'vector start))) )
174
- (" end_pos" . (( " pos " . ,( apply 'vector end))) ))))
173
+ (" start_pos" . , end )
174
+ (" end_pos" . , start ))))
175
175
176
176
(defun hie-run-command (plugin command )
177
177
(setq haskell-ide-engine-process-handle-message
@@ -186,14 +186,14 @@ association lists and count on HIE to use default values there."
186
186
" Handle first plugins call."
187
187
188
188
(let ((menu-items
189
- (apply # 'append
190
- ( mapcar
191
- ( lambda ( plugin )
192
- (mapcar
193
- (lambda (command )
194
- (vector (cdr (assq 'ui_description command)) (list 'hie-run-command (symbol-name (car plugin)) (cdr (assq 'name command)))))
195
- (cdr plugin)))
196
- (cdr (assq 'plugins json) )))))
189
+ (mapcar
190
+ ( lambda ( plugin )
191
+ ( cons ( symbol-name ( car plugin) )
192
+ (mapcar
193
+ (lambda (command )
194
+ (vector (cdr (assq 'ui_description command)) (list 'hie-run-command (symbol-name (car plugin)) (cdr (assq 'name command)))))
195
+ (cdr plugin) )))
196
+ (cdr (assq 'plugins json)))))
197
197
(setq haskell-ide-engine-plugins (cdr (assq 'plugins json)))
198
198
(easy-menu-define hie-menu hie-mode-map
199
199
" Menu for Haskell IDE Engine"
0 commit comments