branch: elpa/haskell-tng-mode commit 19c03cc29480fe1cdfff0a552b796fe9210e071e Author: Tseen She <ts33n....@gmail.com> Commit: Tseen She <ts33n....@gmail.com>
company-mode shouldn't force an hsinspect call --- haskell-tng-contrib-company.el | 2 +- haskell-tng-hsinspect.el | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/haskell-tng-contrib-company.el b/haskell-tng-contrib-company.el index 4d78e98..e436220 100644 --- a/haskell-tng-contrib-company.el +++ b/haskell-tng-contrib-company.el @@ -54,7 +54,7 @@ ;;(message "TNG asked with %S" arg) (seq-mapcat (lambda (names) (all-completions arg (seq-map #'cdr names))) - (haskell-tng--hsinspect-imports))) + (haskell-tng--hsinspect-imports 'lookup-only))) ('sorted t) ('duplicates t) ;; TODO 'meta return the FQN diff --git a/haskell-tng-hsinspect.el b/haskell-tng-hsinspect.el index 435987d..5e12793 100644 --- a/haskell-tng-hsinspect.el +++ b/haskell-tng-hsinspect.el @@ -80,8 +80,8 @@ change." (defvar-local haskell-tng--hsinspect-imports nil "Cache for the last `imports' call for this buffer. t means the process failed.") -(defun haskell-tng--hsinspect-imports () - (if haskell-tng--hsinspect-imports +(defun haskell-tng--hsinspect-imports (&optional lookup-only) + (if (or lookup-only haskell-tng--hsinspect-imports) (unless (eq t haskell-tng--hsinspect-imports) haskell-tng--hsinspect-imports) (setq haskell-tng--hsinspect-imports t) ;; avoid races