From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: master 31945b6c3f: * lisp/progmodes/eglot.el (eglot): Ensure managed-major-mode is a list Date: Tue, 25 Oct 2022 10:35:22 +0100 Message-ID: References: <166668943749.31970.9379739764487638921@vcs2.savannah.gnu.org> <20221025091717.DD9A3C0E4BF@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000dff5ce05ebd89c8a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17208"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org, Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 25 11:38:36 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1onGOJ-0004Gq-PL for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Oct 2022 11:38:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onGKS-0002dM-AJ; Tue, 25 Oct 2022 05:34:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onGKG-0002Lm-EW for emacs-devel@gnu.org; Tue, 25 Oct 2022 05:34:24 -0400 Original-Received: from mail-oa1-x32.google.com ([2001:4860:4864:20::32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onGKE-0007Ye-FN for emacs-devel@gnu.org; Tue, 25 Oct 2022 05:34:24 -0400 Original-Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-13bef14ea06so1040168fac.3 for ; Tue, 25 Oct 2022 02:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=O1beJW5msL61McNmdupIXVPOxZC+fkfURzAQgbR5vw0=; b=M/XZRjM0W0dQfO2qvN9ZvH4g9Lngo/2k58ALEn5G8ks2cji2urUesJP+UC4v+AGOWu 4eEbN+5gJ7qSl5zS193FvsMFdGIJSigHo7wIJnB+jSDFCPedVn/aqOS8SUbH6rmFzfJl chQmHROl4eNeh11MAv3cvkA8WSMSWZND4gRYTPQLajMVOdD3BAmAlyFHoWai1BjU9jqC 6feJ7lc+UYctrGTIUkMtUkZRC0ufMd5x3FNe7w+9Wsa/x9tlz0Nin1VlOIwcj/lQOyuY UG3TRrvfVw0dMs8qxzsJH+/31KJ5RPWGGW84DZRB/2FZx8WRqXoMmBa7qF0j37ERerzC HHGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=O1beJW5msL61McNmdupIXVPOxZC+fkfURzAQgbR5vw0=; b=B+XZ16DRdvk6hMNTJQue4Y7Ek7oWqbL72jvkQuYT+jr02AwoDLcUr810FGbN8O+BzL rg1teo6QFyZ1RFaiGV7oaD2URghcHT1mQQ5GZmh1L9TIgVddu2mnihT8Oyytze+tBLAc hn1eTrYfjn9W/LJ7kSetoOqu7JGK36jfqCaOqGEtC55V0o1YuCVBFtwisWcDp1yDUhWR nvS7jKt+c4AzHgWeol53ui35vSGpLUfj7XuNDvZb86EN7yo4WFMa34PuL2FUBa242EOr JRbV0iLtEoKQLSdIE3NTZXPM/WYJkH6Jhs021F608DGegrV7i9QbDgX4gCL3zLZ7yJXp HnYQ== X-Gm-Message-State: ACrzQf3Ah6kxP+1MrswVLEqEkzUUl2wjveOgGUXVAOaAM/yvffvMocFg tD+hLyAzX3h0T7RmSCrjoRA3/+RWmC0Y0qw9JJEm5dcd X-Google-Smtp-Source: AMsMyM4j/4EJBmtYpXy5bX9tXz5abBtNDPwb7GJDNAVfqO8PuP850RJUWh10yhmU8aj4fk8eRN7vdwwOFycuYnMu2VM= X-Received: by 2002:a05:6870:e242:b0:13b:d561:ad02 with SMTP id d2-20020a056870e24200b0013bd561ad02mr3491908oac.215.1666690460938; Tue, 25 Oct 2022 02:34:20 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2001:4860:4864:20::32; envelope-from=joaotavora@gmail.com; helo=mail-oa1-x32.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:298446 Archived-At: --000000000000dff5ce05ebd89c8a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Also this patch breaks M-x eglot completely (!), hehe but that was another type of oversight that I myself commit more than occasionally. I've just fixed it. Jo=C3=A3o On Tue, Oct 25, 2022 at 10:29 AM Jo=C3=A3o T=C3=A1vora wrote: > Hello Stephen, > > This is a relatively minor nit, but please, in future commits to the file > lisp/progmodes/eglot.el (and maybe other files), try to ensure that > whitespace > which is unrelated to the thing being fixed or added does not creep in. > It > makes browsing the history of the file (which I've taken some care to > preserve) > much easier. > > Personally, I'm quite OK with reviewing whitespace-only cosmetic patches > to that > file, as long as they are in separate commits. > > If in doubt, please run the final patch by me. > > Jo=C3=A3o > > > On Tue, Oct 25, 2022 at 10:18 AM Stephen Leake < > stephen_leake@stephe-leake.org> wrote: > >> branch: master >> commit 31945b6c3fcbdb6f242f0063811d2fb91e4520cd >> Author: Stephen Leake >> Commit: Stephen Leake >> >> * lisp/progmodes/eglot.el (eglot): Ensure managed-major-mode is a li= st >> --- >> lisp/progmodes/eglot.el | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el >> index 71001ba680..432631691c 100644 >> --- a/lisp/progmodes/eglot.el >> +++ b/lisp/progmodes/eglot.el >> @@ -229,7 +229,7 @@ language-server/bin/php-language-server.php")) >> (html-mode . ,(eglot-alternatives >> '(("vscode-html-language-server" "--stdio") ("html-languageserver" >> "--stdio")))) >> (json-mode . ,(eglot-alternatives >> '(("vscode-json-language-server" "--stdio") ("json-languageserver" >> "--stdio")))) >> (dockerfile-mode . ("docker-langserver" >> "--stdio")) >> - ((clojure-mode clojurescript-mode >> clojurec-mode) >> + ((clojure-mode clojurescript-mode >> clojurec-mode) >> . ("clojure-lsp")) >> (csharp-mode . ("omnisharp" "-lsp")) >> (purescript-mode . >> ("purescript-language-server" "--stdio")) >> @@ -1078,6 +1078,7 @@ MANAGED-MAJOR-MODE, which matters to a minority of >> servers. >> >> INTERACTIVE is t if called interactively." >> (interactive (append (eglot--guess-contact t) '(t))) >> + (setq managed-major-mode (eglot--ensure-list managed-mode)) >> (let* ((current-server (eglot-current-server)) >> (live-p (and current-server (jsonrpc-running-p >> current-server)))) >> (if (and live-p >> @@ -2898,7 +2899,7 @@ for which LSP on-type-formatting should be >> requested." >> (defun eglot--hover-info (contents &optional _range) >> (mapconcat #'eglot--format-markup >> (if (vectorp contents) contents (list contents)) "\n")) >> - >> + >> (defun eglot--sig-info (sigs active-sig sig-help-active-param) >> (cl-loop >> for (sig . moresigs) on (append sigs nil) for i from 0 >> >> > > -- > Jo=C3=A3o T=C3=A1vora > --=20 Jo=C3=A3o T=C3=A1vora --000000000000dff5ce05ebd89c8a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Also this patch breaks M-x eglot completely (!), hehe= but that was
another type of oversight that I myself commit more= than occasionally.

I've just fixed it.
=

Jo=C3=A3o

On Tue, Oct 25, 2022 at 10:29 = AM Jo=C3=A3o T=C3=A1vora <joaota= vora@gmail.com> wrote:
Hello Stephen,

This is a relatively minor nit, but please, in future commits to the file<= br>
lisp/progmodes/eglot.el (and maybe other files), try to ensur= e that whitespace
which is unrelated to the thing being fixe= d or added does not creep in.=C2=A0 It
makes browsing the hi= story of the file (which I've taken some care to preserve)
much easier.

Personally, I'm quite OK with = reviewing whitespace-only cosmetic patches to that
file, as long = as they are in separate commits.

If in doubt, = please run the final patch by me.

Jo=C3=A3o


On Tue, Oct 25, 2022 at 10:18 AM Stephen Leake <stephen_leake= @stephe-leake.org> wrote:
branch: master
commit 31945b6c3fcbdb6f242f0063811d2fb91e4520cd
Author: Stephen Leake <stephen_leake@stephe-leake.org>
Commit: Stephen Leake <stephen_leake@stephe-leake.org>

=C2=A0 =C2=A0 * lisp/progmodes/eglot.el (eglot): Ensure managed-major-mode = is a list
---
=C2=A0lisp/progmodes/eglot.el | 5 +++--
=C2=A01 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 71001ba680..432631691c 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -229,7 +229,7 @@ language-server/bin/php-language-server.php"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(html-mode . ,(eglot-alternati= ves '(("vscode-html-language-server" "--stdio") (&q= uot;html-languageserver" "--stdio"))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(json-mode . ,(eglot-alternati= ves '(("vscode-json-language-server" "--stdio") (&q= uot;json-languageserver" "--stdio"))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(dockerfile-mode . ("dock= er-langserver" "--stdio"))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((clojure-mode clojurescript-mode cl= ojurec-mode)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((clojure-mode clojurescript-mode cl= ojurec-mode)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 . ("clojure-lsp"))<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(csharp-mode . ("omnishar= p" "-lsp"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(purescript-mode . ("pure= script-language-server" "--stdio"))
@@ -1078,6 +1078,7 @@ MANAGED-MAJOR-MODE, which matters to a minority of se= rvers.

=C2=A0INTERACTIVE is t if called interactively."
=C2=A0 =C2=A0(interactive (append (eglot--guess-contact t) '(t)))
+=C2=A0 (setq managed-major-mode (eglot--ensure-list managed-mode))
=C2=A0 =C2=A0(let* ((current-server (eglot-current-server))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (live-p (and current-server (jsonrpc-run= ning-p current-server))))
=C2=A0 =C2=A0 =C2=A0(if (and live-p
@@ -2898,7 +2899,7 @@ for which LSP on-type-formatting should be requested.= "
=C2=A0(defun eglot--hover-info (contents &optional _range)
=C2=A0 =C2=A0(mapconcat #'eglot--format-markup
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (if (vectorp contents) con= tents (list contents)) "\n"))
-
+
=C2=A0(defun eglot--sig-info (sigs active-sig sig-help-active-param)
=C2=A0 =C2=A0(cl-loop
=C2=A0 =C2=A0 for (sig . moresigs) on (append sigs nil) for i from 0



--
Jo=C3=A3o = T=C3=A1vora


--
Jo=C3=A3o T=C3=A1vora
--000000000000dff5ce05ebd89c8a--