From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: eglot.el =?utf-8?Q?defcustom=CA=BCs?= Date: Tue, 25 Oct 2022 15:24:12 +0200 Message-ID: <87tu3sniir.fsf@gmail.com> References: <87czagp001.fsf@gmail.com> <874jvsozbq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24723"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel , Stefan Monnier To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 25 15:25:51 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 1onJwF-0006HZ-Hd for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Oct 2022 15:25:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onJv1-0005En-N8; Tue, 25 Oct 2022 09:24:35 -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 1onJuq-000476-Cr for emacs-devel@gnu.org; Tue, 25 Oct 2022 09:24:24 -0400 Original-Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onJuk-0001lL-3W for emacs-devel@gnu.org; Tue, 25 Oct 2022 09:24:23 -0400 Original-Received: by mail-wr1-x430.google.com with SMTP id h9so9853030wrt.0 for ; Tue, 25 Oct 2022 06:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:gmane-reply-to-list:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=sB8ApGdwoN0Ac/vIebvGOCbK0+/+u+HDYzI5bvkJs8E=; b=RXsa3mCFQC7QVlytXrObp+/qRdb5rX1cpbL0Z2f3xI5UbzJ55fKBPEI6dg+3bxWhAi WcLVhXn+bk317BYVlw08MboJPQZ91nB5DTS4hNjqNnC2c/gkid9OZp8nOv+fci4wDuJv g28riTj3IzaUC7y879wMmdMF/wYx3b9azqoXaCExnwOrLpaD/JNMLhp6nw77uDb8ldiM Fzg0DIUB5+qD3e1TWUCFQSCyN5KCxSckNJnvNOhurqVtN/UMp1PdPM8VzgkSsKQaMowg CVzOlGYUuGs/LXBrhp6raS/fseFav+h9zvVhG9sEHmVwy/oHtNqNZyC1+8CM+L0u5X9/ f9yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:gmane-reply-to-list:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sB8ApGdwoN0Ac/vIebvGOCbK0+/+u+HDYzI5bvkJs8E=; b=VjCV+KCfl1RbCCywAXqmenRtjH6+GB5sb8bTZFkzaclLCnbJNWeF0V9sY19dl0lOSu ajMtENPYH9ylY69HM1xZWBRcao9IiK7531/Ly/ivqPy/7mBGft7Qe5K1npmYz64H5S5B /WMkIoaHB1JjvP0EwgDu3ccs56SDkEHDyx5I/4lRkUzBvEv22hn4VN+8KHpD5kj/w8Xo yuW6WXQRW9A76vsXMO3XNbbZYONtTtiH0R94Kt2Jz90nrEWeBRs2BDf/XNBMaC9bVNdH XUtz0ntNxNJABkGHSm5Mj8oUiCc4bxsozD22/XfXu2nw6NprfUKFsf8bpPienr3lisPW GJDQ== X-Gm-Message-State: ACrzQf0YlcpDhslKoYD/++FByEUr3BVLmEFpdMLyUooVUE6HUKkTd5ST FufsIRNGTZDEeCmve+Tzs8Q= X-Google-Smtp-Source: AMsMyM50OF94MHDrb0YeyN4XGK4pOlnGf4jaDMVOsUnRKr4yIqZtAg9nHjJUsLTNxMfC/DwsDgRQ4Q== X-Received: by 2002:a7b:c4cb:0:b0:3c6:f83e:cf79 with SMTP id g11-20020a7bc4cb000000b003c6f83ecf79mr26230536wmk.112.1666704253608; Tue, 25 Oct 2022 06:24:13 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id h8-20020a05600c314800b003c6cd82596esm11537606wmo.43.2022.10.25.06.24.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 06:24:12 -0700 (PDT) In-Reply-To: <874jvsozbq.fsf@gmail.com> (Robert Pluim's message of "Tue, 25 Oct 2022 14:35:53 +0200") Gmane-Reply-To-List: yes Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=rpluim@gmail.com; helo=mail-wr1-x430.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, 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:298462 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> On Tue, 25 Oct 2022 14:35:53 +0200, Robert Pluim s= aid: Robert> I=CA=BCm not sure what the interaction is between :version in d= efcustom=CA=BCs Robert> and eglot being a :core package, which is why I asked. Maybe St= efan Robert> can enlighten us? Anyway, whilst I=CA=BCm looking at defcustom=CA=BCs anyway, how about the attached? Robert --=20 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-eglot-defcustom-types.patch >From d9c09863b905886085af88f972a02405c730b2b2 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 25 Oct 2022 15:18:51 +0200 Subject: [PATCH] Fix eglot defcustom types To: emacs-devel@gnu.org * lisp/progmodes/eglot.el (eglot-autoreconnect): Allow for 'nil'. (eglot-connect-timeout): Allow for 'nil' and add descriptions. (eglot-sync-connect): Split boolean into 'nil' and 't' and add descriptions. (eglot-confirm-server-initiated-edits): Change 'symbol' type to 'const'. --- lisp/progmodes/eglot.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 662c233f30..201fafb671 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -323,13 +323,15 @@ eglot-autoreconnect crashes or network failures. A positive integer number says to only autoreconnect if the previous successful connection attempt lasted more than that many seconds." - :type '(choice (boolean :tag "Whether to inhibit autoreconnection") + :type '(choice (const :tag "Reconnect automatically" t) + (const :tag "Never reconnect" nil) (integer :tag "Number of seconds"))) (defcustom eglot-connect-timeout 30 "Number of seconds before timing out LSP connection attempts. If nil, never time out." - :type 'number) + :type '(choice (number :tag "Number of seconds") + (const :tag "Never time out" nil))) (defcustom eglot-sync-connect 3 "Control blocking of LSP connection attempts. @@ -337,8 +339,9 @@ eglot-sync-connect integer number means block for that many seconds, and then wait for the connection in the background. nil has the same meaning as 0, i.e. don't block at all." - :type '(choice (boolean :tag "Whether to inhibit autoreconnection") - (integer :tag "Number of seconds"))) + :type '(choice (const :tag "Block for `eglot-connect-timeout' seconds" t) + (const :tag "Never block" nil) + (integer :tag "Number of seconds to block"))) (defcustom eglot-autoshutdown nil "If non-nil, shut down server after killing last managed buffer." @@ -363,7 +366,7 @@ eglot-events-buffer-size (defcustom eglot-confirm-server-initiated-edits 'confirm "Non-nil if server-initiated edits should be confirmed with user." :type '(choice (const :tag "Don't show confirmation prompt" nil) - (symbol :tag "Show confirmation prompt" 'confirm))) + (const :tag "Show confirmation prompt" confirm))) (defcustom eglot-extend-to-xref nil "If non-nil, activate Eglot in cross-referenced non-project files." -- 2.38.0.118.g4732897cf0 --=-=-=--