From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: how to speed up Lisp devel time Date: Fri, 09 Aug 2024 15:02:24 +0300 Message-ID: <86ed6xlx9r.fsf@gnu.org> References: <87y156413v.fsf@dataswamp.org> <86sevekvjy.fsf@gnu.org> <87v80a402y.fsf@dataswamp.org> <86ikwakmdg.fsf@gnu.org> <87frre3pxa.fsf@dataswamp.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23994"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Emanuel Berg Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Aug 09 14:03:27 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 1scOL9-00065g-1x for ged-emacs-devel@m.gmane-mx.org; Fri, 09 Aug 2024 14:03:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1scOKF-0000Ul-2f; Fri, 09 Aug 2024 08:02:31 -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 1scOKE-0000TR-3f for emacs-devel@gnu.org; Fri, 09 Aug 2024 08:02:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scOKD-0005ib-4T; Fri, 09 Aug 2024 08:02:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=XGKIsufEp1fclPrqJiOrd7oF7no6qUuTGcD61MCdQJA=; b=po79EXobLL2W nmdOaz1Ekxe2d79U+7J/yDhGfhc72w4SdoqeyR36E59zfuAFmZacSBc01xYeNxG9URvIbWO8tBilF tAJGmfVWL0qqh4fCxbIDluakqDy92wbc4Fft+kKCd1ESVGJ5JCPLTmYeY08SrWQA0Vu6rz8Y61bXk PA5cDbOP47b/W03jrRYKv7Y0LNE5lSyreOnIN/KMpizM8kkZksJ5EXgiava5p5r4P7mxeYj6+l/8p kWeSgRal5GX6ux0vjzfQSVGhSZW2+cBW51402JzYMDOXD9tEgeufjrUJ+BVSOGXO0UtPNPo4e8tkM jNqfFHRuDQBO1LLmRNeZ0Q==; In-Reply-To: <87frre3pxa.fsf@dataswamp.org> (message from Emanuel Berg on Fri, 09 Aug 2024 13:18:25 +0200) 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:322570 Archived-At: > From: Emanuel Berg > Date: Fri, 09 Aug 2024 13:18:25 +0200 > > Eli Zaretskii wrote: > > >>> Why do you need that? > >> > >> I want it to work with M-x, C-u M-x, and C-u 100 M-x. > > > > This is rather unusual, and you should expect to have some > > more-than-normally complicate code in that case. > > What do you mean? It is the same for `forward-line' > > C-u M-x forward-line RET > C-u 4 M-x forward-line RET No, it isn't. forward-line accepts a numeric argument, and that's all. All you need to do to support that is use the corresponding 'interactive' code. > > Also, someone pointed out that you could write this in just > > 83 characters. > > Really? Well, well, let's see the code then! It was posted, I just counted the characters. > > That usually makes little sense in Emacs. Interactive and > > non-interactive uses have different semantics. > > Same default for any kind of call makes little sense. Usually! > > I OTOH thinks that is the first policy I can think of. Then your code is unlikely to be accepted into Emacs. > > That happens, but very rarely. Well-designed clean code > > should avoid that. > > It is better if everyone, well-designers or not, could use > a clean interface to do that. Then one could simply use it and > not having to rely on people writing great Elisp for > everything. Code doesn't write itself. Good design is always needed for elegant code.