bug#81593: [PATCH] Respect eglot-stay-out-of when disabling eglot--managed-mode

João Távora <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <CALDnm53sjz-+=Xgjdt31wNgiDxx3AGXSof7c6rMtgXKEP7RCTQ@mail.gmail.com>
I think this makes sense. If you format the subject line to be slightly
shorter and start with "Eglot: " like the other Eglot commits and add the
bug ref, I think someone else can push it (and that someone can make the
edits themselves if they want).

Maybe

Eglot: respect e-stay-out-of when turning off (bug#81593)

João

On Mon, Aug 10, 2026, 22:51 Aaron Zeng <[email protected]> wrote:

> Tags: patch
>
> Hello,
>
> A user at my site who configured eglot-stay-out-of to include eldoc,
> but then added eglot-signature-eldoc-function (and only that function)
> to eldoc-documentation-functions, noticed that signature help seems to
> mysteriously stop working occasionally.  I found out that
> eldoc-documentation-functions was nil in these buffers, and that
> reverting the buffer fixed the issue.
>
> It seems that eglot--managed-mode's teardown can remove the
> eldoc-documentation-functions added in mode setup regardless of
> eglot-stay-out-of.  This patch makes the teardown symmetric and
> respect eglot-stay-out-of, so that if somebody enables only some of
> the features Eglot offers, like in this case, Eglot will not touch the
> variables either way.
>
> (This is especially important because the mode can be disabled and
> then re-enabled implicitly by eglot-autoreconnect.)
>
> Thanks,
> Aaron Zeng
>
> In GNU Emacs 31.0.91 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
> version 1.18.4, Xaw scroll bars)
> Repository revision: d4b0c58ece90c50b60345ad4a03d4ccc6f58c6d7
> Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
> System Description: Rocky Linux 8.10 (Green Obsidian)
>
> Configured using:
>  'configure
>  --prefix=/nix/store/gsjs85fqs3iljhf6j33pwlyi1vn2qp59-emacs-30.2
>  --disable-build-details --with-modules --with-x-toolkit=lucid
>  --with-cairo --without-xft --disable-gc-mark-trace
>  --without-compress-install --with-toolkit-scroll-bars
>  --with-native-compilation --without-imagemagick --with-mailutils
>  --without-small-ja-dic --with-tree-sitter --with-xinput2
>  --without-xwidgets --with-dbus --without-selinux --without-gif
>  --without-libotf --without-m17n-flt --without-xaw3d --without-webp'
>
>

João Távora
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.