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 17:58:00 +0300 Message-ID: <86bk21lp53.fsf@gnu.org> References: <87y156413v.fsf@dataswamp.org> <86sevekvjy.fsf@gnu.org> <87v80a402y.fsf@dataswamp.org> <86ikwakmdg.fsf@gnu.org> <87frre3pxa.fsf@dataswamp.org> <86ed6xlx9r.fsf@gnu.org> <87a5hl4x9b.fsf@dataswamp.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37851"; 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 16:58:58 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 1scR4z-0009bt-L0 for ged-emacs-devel@m.gmane-mx.org; Fri, 09 Aug 2024 16:58:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1scR4B-0007D9-Js; Fri, 09 Aug 2024 10:58:07 -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 1scR49-0007D1-RM for emacs-devel@gnu.org; Fri, 09 Aug 2024 10:58:05 -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 1scR47-00054d-Te; Fri, 09 Aug 2024 10:58:03 -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=L5tGCVpRqgqjOVuqs48yHDGpi3XlHBX7x+w00LAEXfM=; b=GtZZ065CALlu Y6wpkmZ4CEIXoA2c9iFUzvaw1ym61+F1IE97wBxBhyLOhSgNYVxrVQ1hWyQjoHoeZ1Ua/fUWmH0it suN+/VsnxzSodXxOSzdij7638R5o5s6/fGhfZSF1bK61ojCXYH00yqg8tL76tgSMpl/JeN7YpWdX+ RfCtgjzPLSqFRr2vP+Nmz9xO/g+T2TuTSTP4aQBdQiqMdjcvE+ujfSa7kus9ne8i0vJ2Tt/KOhscD a5z0ICxr1nEhc1Xs9l/NaSuP53LmssZ7qHSKd6NMLjCl/iUvldu3/ov++u6rPkSj4yTc9mmhVsr4r umGHnUl7mbFTycXJVdKnGQ==; In-Reply-To: <87a5hl4x9b.fsf@dataswamp.org> (message from Emanuel Berg on Fri, 09 Aug 2024 15:54:40 +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:322576 Archived-At: > From: Emanuel Berg > Date: Fri, 09 Aug 2024 15:54:40 +0200 > > Eli Zaretskii wrote: > > >>> 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. > > Okay, bad example. > > What about this one, then? > > C-u C-u a > aaaaaaaaaaaaaaaa > > C-u 17 a > aaaaaaaaaaaaaaaaa These all are handled by the 'p' interactive code. So all you need is this: (defun some-fun (arg) (interactive "p") > >>> 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. > > Here is the original code [last], I said it was 402 chars but > excluding the initial whitespace every line it is 376 chars. > > One can make it shorter here and there, but to write that in > 83 chars of Elisp - well, let's see it. https://lists.gnu.org/archive/html/emacs-devel/2024-08/msg00314.html