]> git.eshelyaron.com Git - emacs.git/commitdiff
Prevent desktop.el from saving/restoring eglot--managed-mode
authorJoão Távora <joaotavora@gmail.com>
Thu, 7 Jul 2022 11:30:03 +0000 (12:30 +0100)
committerJoão Távora <joaotavora@gmail.com>
Thu, 7 Jul 2022 11:32:32 +0000 (12:32 +0100)
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

index eb5b86ed10bd0d15e3c7edab90392f9119442258..1b9c997d25357b3fa1ac8ac9cfae07bc42ec7c38 100644 (file)
@@ -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)))
 
+\f
+;;; 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)))
+
 \f
 ;;; Obsolete
 ;;;