From: João Távora Date: Wed, 16 Oct 2019 15:46:03 +0000 (+0100) Subject: Unbreak eglot--setq-saving if symbol is unbound X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~298 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1aa5d0b528996dd56ab20a04235d3cd032c6e616;p=emacs.git Unbreak eglot--setq-saving if symbol is unbound * eglot.el (eglot--setq-saving): check if symbol is bound --- 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."