From: Jürgen Hötzel Date: Tue, 5 Jan 2021 10:56:06 +0000 (+0100) Subject: Flex completion style is not available on emacs < 27 X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~189 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=40453c991e12d966a950dc6ec2fe522e57c5a5f2;p=emacs.git 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 --- 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))