all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Stephen Leake" <stephen_leake@stephe-leake.org>,
	"João Távora" <joaotavora@gmail.com>
Cc: 58745@debbugs.gnu.org
Subject: bug#58745: 29.0.50; eglot managed-major-mode must be a list
Date: Thu, 27 Oct 2022 19:19:09 +0300	[thread overview]
Message-ID: <83mt9hkznm.fsf@gnu.org> (raw)
In-Reply-To: <86pmeijuvz.fsf@stephe-leake.org> (message from Stephen Leake on Sun, 23 Oct 2022 10:46:08 -0700)

> From: Stephen Leake <stephen_leake@stephe-leake.org>
> Date: Sun, 23 Oct 2022 10:46:08 -0700
> 
> I'm calling `eglot' from lisp. The doc string says the first argument
> `managed-major-mode' is an atom, not a list. But it is passed to
> eglot--connect as the first argument, which is expected to be a list of
> major modes. When called interactively, `managed-major-mode' is set by
> (eglot--guess-contact t), which returns a list.
> 
> So when not interactive, `eglot' must convert `managed-major-mode' into
> a list:
> 
> -------------------
> diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
> index 71001ba680..dee88db022 100644
> --- a/lisp/progmodes/eglot.el
> +++ b/lisp/progmodes/eglot.el
> @@ -1078,6 +1078,8 @@ eglot
>  
>  INTERACTIVE is t if called interactively."
>    (interactive (append (eglot--guess-contact t) '(t)))
> +  (unless (listp managed-major-mode)
> +    (setq managed-major-mode (list managed-major-mode)))
>    (let* ((current-server (eglot-current-server))
>           (live-p (and current-server (jsonrpc-running-p current-server))))
>      (if (and live-p
> ------------------

João, any comments?





  reply	other threads:[~2022-10-27 16:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-23 17:46 bug#58745: 29.0.50; eglot managed-major-mode must be a list Stephen Leake
2022-10-27 16:19 ` Eli Zaretskii [this message]
2022-10-27 17:27   ` João Távora
2022-10-27 17:37     ` Eli Zaretskii
2022-10-27 17:51     ` Stephen Leake
2022-10-27 17:34   ` Robert Pluim
2022-10-27 17:39     ` João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83mt9hkznm.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=58745@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=stephen_leake@stephe-leake.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.