From 3f80860a4b84fceda7d93e7a70720228123ed8d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Fayzrakhmanov=20=28=D0=90=D1=80=D1=82=D1=83=D1=80?= =?UTF-8?q?=20=D0=A4=D0=B0=D0=B9=D0=B7=D1=80=D0=B0=D1=85=D0=BC=D0=B0=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=29?= Date: Mon, 4 Apr 2016 16:29:20 +0500 Subject: [PATCH] Disable interactive operator completions --- haskell-completions.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/haskell-completions.el b/haskell-completions.el index c0de633b2..6484cb8f2 100644 --- a/haskell-completions.el +++ b/haskell-completions.el @@ -324,7 +324,16 @@ Returns nil if no completions available." (let ((prefix-data (haskell-completions-grab-prefix))) (when prefix-data (cl-destructuring-bind (beg end pfx typ) prefix-data - (when (not (eql typ 'haskell-completions-general-prefix)) + (when (and (not (eql typ 'haskell-completions-general-prefix)) + ;; GHCi prior to version 8.0.1 have bug in `:complete` + ;; command: when completing operators it returns a list of + ;; all imported identifiers (see Track ticket URL + ;; `https://ghc.haskell.org/trac/ghc/ticket/10576'). This + ;; leads to significant Emacs slowdown. To aviod slowdown + ;; operator completions are disabled for now. + (not (save-excursion + (goto-char (1- end)) + (haskell-mode--looking-at-varsym)))) ;; do not complete things in comments (if (cl-member typ