From: João Távora Date: Thu, 7 Jul 2022 11:30:03 +0000 (+0100) Subject: Prevent desktop.el from saving/restoring eglot--managed-mode X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~39 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6c8aee268d81ef616169d79ea5bd0331aebc25ee;p=emacs.git 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 --- 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 ;;;