]> git.eshelyaron.com Git - emacs.git/commit
Unbreak m-x vc-revert, which reverts preserving modes
authorJoão Távora <joaotavora@gmail.com>
Mon, 21 Oct 2019 15:07:38 +0000 (16:07 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 21 Oct 2019 15:07:38 +0000 (16:07 +0100)
commit0816da8e78f1d0d643fdd1259a2f307c0817e316
treeb7684feb7f5d7adbf50ba6704d08e5bc2665266b
parentf71716e91427d893773ca68d5d3dec417a963571
Unbreak m-x vc-revert, which reverts preserving modes

Unlike the normal revert-buffer command, vc-revert, doesn't re-apply
the major mode, meaning it was missing a didOpen to pair with the
didClose that is unconditionally sent on both commands.

Needed to use the dynamic variable revert-buffer-preserve-modes, and,
curiously, also forward-declare it to appease the byte compiler.

* eglot.el (eglot--managed-mode): Use after-revert-hook.
(revert-buffer-preserve-modes): Forward declare.
(eglot--after-revert-hook): Signal didOpen when preserving-modes.
(eglot--maybe-activate-editing-mode): Tweak comment.
lisp/progmodes/eglot.el