From 40453c991e12d966a950dc6ec2fe522e57c5a5f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20H=C3=B6tzel?= Date: Tue, 5 Jan 2021 11:56:06 +0100 Subject: [PATCH] Flex completion style is not available on emacs < 27 * eglot.el (eglot--managed-mode): check if flex style available Copyright-paperwork-exempt: yes GitHub-reference: fix https://github.com/joaotavora/eglot/issues/582 --- lisp/progmodes/eglot.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index c7f70ea141e..9267a138bd3 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1362,7 +1362,8 @@ Use `eglot-managed-p' to determine if current buffer is managed.") (eglot--setq-saving flymake-diagnostic-functions '(eglot-flymake-backend t)) (eglot--setq-saving company-backends '(company-capf)) (eglot--setq-saving company-tooltip-align-annotations t) - (eglot--setq-saving completion-styles '(flex basic)) + (when (assoc 'flex completion-styles-alist) + (eglot--setq-saving completion-styles '(flex basic))) (unless (eglot--stay-out-of-p 'imenu) (add-function :before-until (local 'imenu-create-index-function) #'eglot-imenu)) -- 2.39.5