From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.devel Subject: Re: master f2d2fe6fc8: server-execute: Initialize the *scratch* buffer Date: Wed, 04 May 2022 08:41:50 -0700 Message-ID: <87levhe24h.fsf@athena.silentflame.com> References: <165162665935.26821.8964921720746152690@vcs2.savannah.gnu.org> <20220504011059.9F667C009A8@vcs2.savannah.gnu.org> <87levhdfeh.fsf@athena.silentflame.com> <87y1zhe5qz.fsf@athena.silentflame.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6240"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Notmuch/0.36 Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Stefan Monnier , Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 04 17:43:25 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 1nmH9w-0001PE-9V for ged-emacs-devel@m.gmane-mx.org; Wed, 04 May 2022 17:43:24 +0200 Original-Received: from localhost ([::1]:39950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmH9u-0007w3-Vw for ged-emacs-devel@m.gmane-mx.org; Wed, 04 May 2022 11:43:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmH8U-0005n6-Jt for emacs-devel@gnu.org; Wed, 04 May 2022 11:41:54 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:60139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmH8S-00019n-QE for emacs-devel@gnu.org; Wed, 04 May 2022 11:41:54 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 013CF5C01D4; Wed, 4 May 2022 11:41:52 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 04 May 2022 11:41:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1651678911; x=1651765311; bh=Fj RvACcJczphippNStASHE8K44pp/V0i9dGbK5axR+8=; b=mtmAH9FDwSNlcYF52S seoCccQkfFDcEPspvMEOzaCliknD+9jVA2VIvF/y98pzEojFvDdDT/WtL6Ag2jp2 TdpkHkWJLNoCc6ihU8SBVeDX7BekPOVttCT1N1KrNsOssXrfRPTUxfbLmtdy1gDQ iy+H6f2b/IalSdHP08aRYBYAunOYkHH5vm3gXgq1N9TxF/dyqDQbmv4WogLvxydP y2QhMGhqeQUJF+DzU2kZi81GuQn9RJy22gZcI0zhNXKlou1vl7tog98R1CJDNcJq qavs3hk2xoX00nlpIUpXvf2K3ewh0rEoF6h+oF4Zj4x3VJDi9X8uQpaBqeC0fgok sx5w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1651678911; x= 1651765311; bh=FjRvACcJczphippNStASHE8K44pp/V0i9dGbK5axR+8=; b=n wZlF3AS/zfwXhWiPoslanpBOoJFkAgYxjCoEI+suqCgGIzhoNLLbepiHdcsPYD5u ulXhGQxvbnCg35PO+M2PBAxtMKr9fxFxsWt1fggWo5qLkez5Gwz+IksNmufNrCvD uAM27JXDUMPraOFGFDdb/MpP9i4UNcQp3jQp1RINVD2mBy8V+q6mEmhlJjqJeBmz o/sezqJrWWw9mIqQFEnsyBgzCCTjAtirr3sP1fJyz1GZfvkKOleJ6MXk15j73PjG sC+NDGwPSIkTayy4YbfonOOFdw9CLs1EEym0fFX3GY+pAMmVr8cyirA5ijdTowb4 td39SfjEGohWOzsfWmf5g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdelgdeludcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufgjfhgffffkgggtsehttddttddtredtnecuhfhrohhmpefuvggrnhcu hghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqne cuggftrfgrthhtvghrnhepvdejtedtieetjeegjeekgffghedtkeeltdeftdetkefgueek fedtudfhteeljeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 4 May 2022 11:41:51 -0400 (EDT) Original-Received: by athena.silentflame.com (Postfix, from userid 1000) id 65ADC1BB9A5; Wed, 4 May 2022 15:41:50 +0000 (UTC) In-Reply-To: Received-SPF: pass client-ip=66.111.4.27; envelope-from=spwhitton@spwhitton.name; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.devel:289188 Archived-At: Hello, On Wed 04 May 2022 at 10:42am -04, Stefan Monnier wrote: >>> If you could factor out the commonality (and remove the gratuitous >>> differences along the way), I'd be grateful. >>> In my experience, it's always worth it in the long run (and it's >>> generally an opportunity to improve the code, because once it only >>> exists at a single place, it's much easier to add functionality and >>> customizability to it). >> In order to factor it out of the C as well I need to define it in C with >> the DEFUN macro, right? Otherwise each C callsite would have to use >> Ffuncall, which doesn't seem right. > > Yup. Using Ffuncall (of `call1`, call2`, ...) is not in itself > a problem, especially for code like this which is not > performance critical. But I suspect that using a DEFUN might be a better > option here for bootstrap reasons (if the code needs to be run before > things like `subr.el` have been loaded). In order to make all these cases consistent, my new code will (insert (substitute-command-keys initial-scratch-message)), so it's going to require that both help.el and startup.el have been loaded. So I guess it should be in Lisp. It looks like Fother_window is called only from Fcall_interactively and Fkill_buffer, so there probably isn't a bootstrapping issue if I make those Ffuncall my new `get-initial-buffer-create'. It looks like bootstrapping C code just makes an empty *scratch* and leaves it to startup.el to initialise it. -- Sean Whitton