unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: eglot.el commentary suggestion
@ 2022-10-25 12:59 Payas Relekar
  0 siblings, 0 replies; 7+ messages in thread
From: Payas Relekar @ 2022-10-25 12:59 UTC (permalink / raw)
  To: João Távora; +Cc: Robert Pluim, emacs-devel

João Távora <joaotavora@gmail.com> writes:

> ...
> João power pedant doctrinaire emeritus III

Heh, off-topic, but this signature is sopt-on and highly appreciated :D
--



^ permalink raw reply	[flat|nested] 7+ messages in thread
* Minor bug in eglot; managed-major-mode must be a list
@ 2022-10-23 17:55 Stephen Leake
  2022-10-24  4:49 ` Theodor Thornhill
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Leake @ 2022-10-23 17:55 UTC (permalink / raw)
  To: emacs-devel

See bug#58745; there's a patch included. Report duplicated here:

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:

-------------------

[2. text/x-patch]
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 Távora; ok to commit this patch?

-- 
-- Stephe



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-25 13:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 12:59 eglot.el commentary suggestion Payas Relekar
  -- strict thread matches above, loose matches on Subject: below --
2022-10-23 17:55 Minor bug in eglot; managed-major-mode must be a list Stephen Leake
2022-10-24  4:49 ` Theodor Thornhill
2022-10-24  8:54   ` Robert Pluim
2022-10-24 15:54     ` Philip Kaludercic
2022-10-24 16:16       ` Robert Pluim
2022-10-25  8:33         ` João Távora
2022-10-25 10:16           ` eglot.el commentary suggestion Robert Pluim
2022-10-25 11:00             ` João Távora
2022-10-25 11:16               ` Po Lu
2022-10-25 12:26                 ` Robert Pluim
2022-10-25 12:51                   ` João Távora
2022-10-25 13:18                     ` Robert Pluim

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).