emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 3604173 64/69: Unbreak eglot--setq-saving if symb


From: João Távora
Subject: [elpa] externals/eglot 3604173 64/69: Unbreak eglot--setq-saving if symbol is unbound
Date: Sun, 20 Oct 2019 08:21:54 -0400 (EDT)

branch: externals/eglot
commit 3604173de029de9b0988926b60cd81b913881eda
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    Unbreak eglot--setq-saving if symbol is unbound
    
    * eglot.el (eglot--setq-saving): check if symbol is bound
---
 eglot.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/eglot.el b/eglot.el
index 0220969..bb5d5f8 100644
--- a/eglot.el
+++ b/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."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]