Fix 'ghc-show-info' when cursor is on space

'ghc-show-info' asks for user to enter expression if 'ghc-thing-at-point'
returns nil. Because 'ghc-display-information' failed such case.
This commit is contained in:
Syohei YOSHIDA 2012-11-30 09:48:45 +09:00
parent 5189977cbc
commit 81052efe64

View File

@ -14,7 +14,7 @@
(interactive "P")
(let* ((modname (or (ghc-find-module-name) "Main"))
(expr0 (ghc-things-at-point))
(expr (if ask (ghc-read-expression expr0) expr0))
(expr (if (or ask (not expr0)) (ghc-read-expression expr0) expr0))
(file (buffer-file-name))
(cmds (list "info" file modname expr)))
(ghc-display-information cmds nil)))