current dir hack for ghc-info.el.
This commit is contained in:
parent
71ebb82eb2
commit
ae22ff40d4
@ -16,8 +16,10 @@
|
|||||||
(message "%s not found" ghc-module-command)
|
(message "%s not found" ghc-module-command)
|
||||||
(let* ((expr0 (thing-at-point 'symbol))
|
(let* ((expr0 (thing-at-point 'symbol))
|
||||||
(expr (if ask (ghc-read-expression expr0) expr0))
|
(expr (if ask (ghc-read-expression expr0) expr0))
|
||||||
|
(cdir default-directory)
|
||||||
(file (buffer-name)))
|
(file (buffer-name)))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
|
(cd cdir)
|
||||||
(call-process ghc-module-command nil t nil "type" file expr)
|
(call-process ghc-module-command nil t nil "type" file expr)
|
||||||
(message (buffer-substring (point-min) (1- (point-max))))))))
|
(message (buffer-substring (point-min) (1- (point-max))))))))
|
||||||
|
|
||||||
@ -27,12 +29,14 @@
|
|||||||
(message "%s not found" ghc-module-command)
|
(message "%s not found" ghc-module-command)
|
||||||
(let* ((expr0 (thing-at-point 'symbol))
|
(let* ((expr0 (thing-at-point 'symbol))
|
||||||
(expr (if ask (ghc-read-expression expr0) expr0))
|
(expr (if ask (ghc-read-expression expr0) expr0))
|
||||||
|
(cdir default-directory)
|
||||||
(file (buffer-name))
|
(file (buffer-name))
|
||||||
(buf (get-buffer-create ghc-error-buffer-name)))
|
(buf (get-buffer-create ghc-error-buffer-name)))
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(insert
|
(insert
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
|
(cd cdir)
|
||||||
(call-process ghc-module-command nil t nil "info" file expr)
|
(call-process ghc-module-command nil t nil "info" file expr)
|
||||||
(buffer-substring (point-min) (1- (point-max))))))
|
(buffer-substring (point-min) (1- (point-max))))))
|
||||||
(display-buffer buf))))
|
(display-buffer buf))))
|
||||||
|
Loading…
Reference in New Issue
Block a user