From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: emacs-30 768e92b9c02: Update options that depend on 'which-key-dont-use-unicode' Date: Mon, 24 Jun 2024 18:49:43 +0000 Message-ID: <87jzie2n20.fsf@posteo.net> References: <171921519771.16563.15139426619834982564@vcs2.savannah.gnu.org> <20240624074638.294E1C1FB6E@vcs2.savannah.gnu.org> <875xtybedy.fsf@gmail.com> <87tthi2xmj.fsf@posteo.net> <871q4mb6w6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2061"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jun 24 20:50:40 2024 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 1sLoly-0000KT-GX for ged-emacs-devel@m.gmane-mx.org; Mon, 24 Jun 2024 20:50:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLolF-0003b5-0z; Mon, 24 Jun 2024 14:49:53 -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 1sLolC-0003at-V2 for emacs-devel@gnu.org; Mon, 24 Jun 2024 14:49:51 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLolB-00056N-24 for emacs-devel@gnu.org; Mon, 24 Jun 2024 14:49:50 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D432E240105 for ; Mon, 24 Jun 2024 20:49:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1719254984; bh=2vuDkBcg86LRurg5AEPuEm2gaUIuJDwpmXclqjp52bg=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=MpbrCMreKqF5ewhkxde8A2nRPNa1+L+U2sbMu42/3os7WVohrBhq3ec/nXoDMUbaH 5t7Xf1SgSp2vnZmjurH8qz1/O8nXF0ZKggRhY5OG3jQ6/LCnolKXEYR4MEI3LIXo1x jSrHLkyOQpAHvDatplR5wK7g1d4VLNIYQUKr10pqguL20U8xY3Rz39TuJ5qLHf70ve 54ADU3Sn0frx4eBxeyTa6Nm3aeBH+xH5EiHWVx4pY3Lgu5vofRzSMZNCvZaNWofL17 XIl/mzzd5vorh9YGYTH5Q835aikaFx2POFG3dtJiiGmjWeEtYdNmi041KQGng9YpjV K260KfDEoyOVw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4W7H7q5qljz9rxK; Mon, 24 Jun 2024 20:49:43 +0200 (CEST) In-Reply-To: <871q4mb6w6.fsf@gmail.com> (Robert Pluim's message of "Mon, 24 Jun 2024 19:14:01 +0200") OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320617 Archived-At: Robert Pluim writes: >>>>>> On Mon, 24 Jun 2024 15:01:24 +0000, Philip Kaludercic said: > >> This commit causes `which-key-separator' and `which-key-ellipsis' = to > >> be nil for me (after `which-key-mode'). Reverting this commit fixe= s it. > > Philip> Eh, that might be because `which-key-dont-use-unicode' is bei= ng > Philip> evaluated before the other two options, but the :set function= is giving > Philip> them initial values (nil), even though we haven't determined = their > Philip> default value yet. > > Philip> Does > > Philip> diff --git a/lisp/which-key.el b/lisp/which-key.el > Philip> index 91007ce4ada..8b78bfb2576 100644 > Philip> --- a/lisp/which-key.el > Philip> +++ b/lisp/which-key.el > Philip> @@ -133,6 +133,7 @@ which-key-dont-use-unicode > Philip> (mapc #'custom-reevaluate-setting > Philip> '(which-key-separator > Philip> which-key-ellipsis))) > Philip> + :initialize #'custom-initialize-changed > Philip> :type 'boolean > Philip> :package-version "1.0" :version "30.1") >=20=20 > > > Philip> make sense? I am always uncertain which :initialize value to= use. > > That works for me, although I won=CA=BCt claim to understand why =F0=9F= =98=80 My reasoning is that this will only run the setter if the value is /changed/, right? So if we set `which-key-dont-use-unicode' is set before we load which-key, then the user option inherits the configuration and the other two options use the current value to determine their default value. If on the other hand we change the user option after which-key has been loaded, then the custom setter will take effect, and will re-load the default value, which has previously been set to the (if ...) expression, as was the case before. > Robert --=20 Philip Kaludercic on peregrine