From 6c8aee268d81ef616169d79ea5bd0331aebc25ee Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Thu, 7 Jul 2022 12:30:03 +0100 Subject: [PATCH] Prevent desktop.el from saving/restoring eglot--managed-mode Although desktop.el compatibility is Emacs bughttps://github.com/joaotavora/eglot/issues/56407, the optimal solution agreed to there is a bit more work than what I have time to right now. See e.g. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=bug%2356407https://github.com/joaotavora/eglot/issues/68. For now, just use `with-eval-after-load' * eglot.el (Hacks desktop): Add eglot--managed-mode to desktop-minor-mode-handlers GitHub-reference: fix https://github.com/joaotavora/eglot/issues/990 --- lisp/progmodes/eglot.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index eb5b86ed10b..1b9c997d253 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -3169,6 +3169,17 @@ If NOERROR, return predicate, else erroring function." (when (eq ?! (aref arg 1)) (aset arg 1 ?^)) `(,self () (re-search-forward ,(concat "\\=" arg)) (,next))) + +;;; Hacks +;;; +;; FIXME: Although desktop.el compatibility is Emacs bug#56407, the +;; optimal solution agreed to there is a bit more work than what I +;; have time to right now. See +;; e.g. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=bug%2356407#68. +;; For now, just use `with-eval-after-load' +(with-eval-after-load 'desktop + (add-to-list 'desktop-minor-mode-handlers '(eglot--managed-mode . ignore))) + ;;; Obsolete ;;; -- 2.39.2