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 07:23:32 -0700 Message-ID: <87y1zhe5qz.fsf@athena.silentflame.com> References: <165162665935.26821.8964921720746152690@vcs2.savannah.gnu.org> <20220504011059.9F667C009A8@vcs2.savannah.gnu.org> <87levhdfeh.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="32767"; 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 Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 04 16:24:45 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 1nmFvm-0008Bz-Vo for ged-emacs-devel@m.gmane-mx.org; Wed, 04 May 2022 16:24:45 +0200 Original-Received: from localhost ([::1]:52406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmFvl-00089W-NP for ged-emacs-devel@m.gmane-mx.org; Wed, 04 May 2022 10:24:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmFum-0007H0-LO for emacs-devel@gnu.org; Wed, 04 May 2022 10:23:40 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:44947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmFuk-0005Te-Sm for emacs-devel@gnu.org; Wed, 04 May 2022 10:23:40 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 59CA65C01AE; Wed, 4 May 2022 10:23:35 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 04 May 2022 10:23:35 -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=1651674215; x=1651760615; bh=Zj 2a3MWx+sxhVUMGmCLZS1Zv/YVAB/Hb6W1ExutPV9Q=; b=cRH5NTNChw852zYzW7 mhR/VtaUPGEiVWKPEyUyz3QDk6TVacSs5n+pAmXh78JXL6X3520GJEZxkXUkfRHl FK+eebUW2UV1tL49QPz/N1BqxHeTW/R9/esny/UDSGpJm523BPlDCOKpCpXj9r9w W5i7RvMHS1mAm4Gm58U0vs24CYKq9sd8WcPIAuwAx5dXUcAn9I7V2RkjOsFMvktK vSkAjFEq+SScLpX2gTmy1kA21flZWYBWtuvFgVP0aU3ds7suwRR6PkjF15E9v0Uc oduMJMtccLxZc4GJsnfrVwTsnL0sttXHGsNfBktzal+UctDdrfY52KA4jt7hc7wB bFgA== 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=1651674215; x= 1651760615; bh=Zj2a3MWx+sxhVUMGmCLZS1Zv/YVAB/Hb6W1ExutPV9Q=; b=u IC5ozb4DTRupE2HT1c9gjWeEa+TSsJpNrMvBV9iLTkOfegg/94/x/j7sibcKt39D HUCw87dgLHeBpis3W8yDn4U1fH23amcqbz9uFrZeMVqcoDDRnQm58yEVek7ahV2v zW3palH4FLDBSoO8vsmOUheZbANKlL97ibxvY0heBK3SJD4lylTJOork4n2YzYrm WXE6IUyOkh8DkKdO2CC2ruxbrtX5ofponfYr6rK5a0zRU7Vr1t6n5SltGKIXUcQ6 Y8eApqVgH4On3BRnM7JSgky5FZ0fcbPXNPVNNpMF94tVHbfcdHpzJjFsRteCsYBr ssnroQJUYKtDjJeXo/K+w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdelgdejhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufgjfhgffffkgggtsehttddttddtredtnecuhfhrohhmpefuvggrnhcu hghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqne cuggftrfgrthhtvghrnhepvdejtedtieetjeegjeekgffghedtkeeltdeftdetkefgueek fedtudfhteeljeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 4 May 2022 10:23:35 -0400 (EDT) Original-Received: by athena.silentflame.com (Postfix, from userid 1000) id 0E1371BB9A5; Wed, 4 May 2022 14:23:33 +0000 (UTC) In-Reply-To: Received-SPF: pass client-ip=66.111.4.29; envelope-from=spwhitton@spwhitton.name; helo=out5-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:289174 Archived-At: Hello, On Wed 04 May 2022 at 08:47am -04, Stefan Monnier wrote: >>> Could we put that code in a function so we don't need to duplicate it >>> (and sync it)? >> There's a similar thing in a lot of different places in C, too. >> My own inclination is that it's simple, and in fact slightly different >> in different places, so not worth factoring out, but YMMV. > > 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. -- Sean Whitton