From 4ef443e9e8da7d57f956d800f3a4d79566bba423 Mon Sep 17 00:00:00 2001 From: Kamil Dworakowski Date: Sat, 20 Feb 2016 09:41:11 +0100 Subject: [PATCH] fix haskell-hoogle to work with buffer local var read the haskell-hoogle-command variable before switching to the help window which removes the buffer local haskell-hoogle-command from the scope --- haskell-hoogle.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/haskell-hoogle.el b/haskell-hoogle.el index 7f673150a..67f5c7fbd 100644 --- a/haskell-hoogle.el +++ b/haskell-hoogle.el @@ -65,13 +65,13 @@ is asked to show extra info for the items matching QUERY.." current-prefix-arg))) (if (null haskell-hoogle-command) (browse-url (format haskell-hoogle-url (url-hexify-string query))) - (with-help-window "*hoogle*" - (with-current-buffer standard-output - (insert (shell-command-to-string - (concat haskell-hoogle-command - (if info " -i " "") - " --color " (shell-quote-argument query)))) - (ansi-color-apply-on-region (point-min) (point-max)))))) + (let ((command (concat haskell-hoogle-command + (if info " -i " "") + " --color " (shell-quote-argument query)))) + (with-help-window "*hoogle*" + (with-current-buffer standard-output + (insert (shell-command-to-string command)) + (ansi-color-apply-on-region (point-min) (point-max))))))) ;;;###autoload (defalias 'hoogle 'haskell-hoogle)