From 81052efe642b760417a8f2650542cb0ae715971a Mon Sep 17 00:00:00 2001 From: Syohei YOSHIDA Date: Fri, 30 Nov 2012 09:48:45 +0900 Subject: [PATCH] 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. --- elisp/ghc-info.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elisp/ghc-info.el b/elisp/ghc-info.el index 4ab0bee..8f2caab 100644 --- a/elisp/ghc-info.el +++ b/elisp/ghc-info.el @@ -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)))