From 1aa5d0b528996dd56ab20a04235d3cd032c6e616 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Wed, 16 Oct 2019 16:46:03 +0100 Subject: [PATCH] Unbreak eglot--setq-saving if symbol is unbound * eglot.el (eglot--setq-saving): check if symbol is bound --- lisp/progmodes/eglot.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 0220969e6fd..bb5d5f81690 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1173,9 +1173,10 @@ and just return it. PROMPT shouldn't end with a question mark." "Bindings saved by `eglot--setq-saving'.") (defmacro eglot--setq-saving (symbol binding) - `(progn (push (cons ',symbol (symbol-value ',symbol)) - eglot--saved-bindings) - (setq-local ,symbol ,binding))) + `(when (boundp ',symbol) + (push (cons ',symbol (symbol-value ',symbol)) + eglot--saved-bindings) + (setq-local ,symbol ,binding))) (define-minor-mode eglot--managed-mode "Mode for source buffers managed by some EGLOT project." -- 2.39.2