From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.devel Subject: Re: Suggestion for improving ergonomics of repeat-maps: define-repeat-map Date: Thu, 09 Sep 2021 22:35:13 +0200 Message-ID: <87zgslzdvi.fsf@gmail.com> References: <874katproz.fsf@mail.linkov.net> <87h7etsjxx.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27798"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: acdw , emacs-devel@gnu.org, Juri Linkov To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 09 22:37:36 2021 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 1mOQng-00073t-J1 for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Sep 2021 22:37:36 +0200 Original-Received: from localhost ([::1]:57804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOQnf-0008KE-G1 for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Sep 2021 16:37:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOQlb-0004QZ-V4 for emacs-devel@gnu.org; Thu, 09 Sep 2021 16:35:29 -0400 Original-Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:50706) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOQlV-0005x0-UF for emacs-devel@gnu.org; Thu, 09 Sep 2021 16:35:25 -0400 Original-Received: by mail-wm1-x329.google.com with SMTP id m2so2264218wmm.0 for ; Thu, 09 Sep 2021 13:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=hFdrVmMq0caMCX+Hep5U1hGc3t0ojPPUYgyUd2qi/R4=; b=NRmMn/IrSLGJhSBlkcwD2xxEorZVLoBSCKWyt004a9uAs5wLnuu41BAgVxylKrNx7i eawavkOcXtsBbSU+jYh5Xr2/b8h43YCtqPy7/T86nelvL72I4EtRKIO/w+TbDkM7wlns vap7V3FLhjzJF7MN4WA9BMaJKzDSb5XlML3onozUTknCcmvh7dYa/bGDbEfuZ0ehXVss 2Tm3Y2CTaGwvv5NjsoDgNOzUhfOsT+uHgvY69JmqgipFPVfoS0g8AW/vsLeY1l3FV8jA CycPM44+k8uVRxhyy6wPd2MNYw9ndwrbJSLYlCp4ucYpiHijwd8iJ2KVUenapJThMBf+ Xo1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=hFdrVmMq0caMCX+Hep5U1hGc3t0ojPPUYgyUd2qi/R4=; b=VWn1QbIv1RhNpIrvhT8bxq+FQBvFl+DJd9WM910eck8GWUQJgIznDyF+6b5FJihCRY XJla1PlGLn3brHKL/nN2aTGbLpapDM1iqmwkQmOeeHh3smsjgycUfRIzO+s+IG4j2C4d HRoSkSvtSkejn+/Bi39W2Why5wvaa+7PDlwLJdDsA8Z8Wfsd8wNJYg2rgFcUuxRsNN2d PMUaGKFLmYS45JHcl5+wTiJx/KB82vGcjahPolJodDycyO14PkqAe4nDTe8KlqVPKRAw 3DQk9gGrLdQFVcLkZf8alOmf+QeatA6+XoT5wwsrhAmhVo3i95uepcSsNSIe/aX5kPqo q2Aw== X-Gm-Message-State: AOAM530B8/Re80ZVsaaj45kXuMjPTBpJ/Q68Yva6ek9cV6Lp3RoZW33+ D2iWClEw8jworPetuJFTHY59Bm0uOy8vKA== X-Google-Smtp-Source: ABdhPJy6VuiIEcjfWL0CUXiPQJIrHofqR2xApPKjKYHMc03O/jdvUIa0Erxfs6pxywygpADPTwIudw== X-Received: by 2002:a7b:c7d4:: with SMTP id z20mr4875866wmk.172.1631219715940; Thu, 09 Sep 2021 13:35:15 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::b1d]) by smtp.gmail.com with ESMTPSA id f7sm2410180wmh.20.2021.09.09.13.35.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Sep 2021 13:35:15 -0700 (PDT) In-Reply-To: <87h7etsjxx.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 09 Sep 2021 20:06:02 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=arstoffel@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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:274474 Archived-At: On Thu, 9 Sep 2021 at 20:06, Lars Ingebrigtsen wrote: > Juri Linkov writes: > >> If normal keymaps were defined with a macro similar to the macro >> that you created, it would be easier to migrate the existing repeat-maps >> to your macro. I mean if we had a macro `define-keymap' that defines >> normal keymaps and that is similar to your `define-repeat-map', >> then creating a repeat-map from the normal map would require just >> changing the macro name `define-keymap' to `define-repeat-map'. > > Heh. I've got a `define-keymap' macro stashed away, waiting for Emacs > 29. :-) (So another week or so.) Why is it a macro, not just a function? This is tangential, but if define-key could take an arbitrary number of KEY DEF pairs to define (like setq for variables), it would be immensely more convenient. It would also be nice to allow keyword arguments like :prefix (to define a bunch of keys with a common prefix) or :filter (to put all the DEFs in menu-items with the provided :filter function)