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: Deprecation of define-key? Date: Tue, 02 Aug 2022 11:44:17 +0200 Message-ID: <871qtzou8e.fsf@gmail.com> References: <875yjgszm4.fsf@posteo.net> <87mtcr99mx.fsf@igel.home> <871qu2lt68.fsf@fau.de> <87sfmizump.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="34624"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Philip Kaludercic , Andreas Schwab , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 02 11:47:09 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 1oIoUX-0008rA-B6 for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Aug 2022 11:47:09 +0200 Original-Received: from localhost ([::1]:36224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIoUW-0005vH-5B for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Aug 2022 05:47:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIoRr-0004Z6-Ie for emacs-devel@gnu.org; Tue, 02 Aug 2022 05:44:23 -0400 Original-Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]:41675) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIoRq-0000TP-0j for emacs-devel@gnu.org; Tue, 02 Aug 2022 05:44:23 -0400 Original-Received: by mail-ej1-x62f.google.com with SMTP id gk3so12789592ejb.8 for ; Tue, 02 Aug 2022 02:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :user-agent:mime-version; bh=Es42+SMOdcrVIIyQca0Jj78RPcAK/c9c7JVLwp5csAs=; b=lW/SDqEYbk7iMMpUgPlt32xB30+iBnD1OXQ5vL2qix5lubCxKFZZWSHODX2Ncs7b1i OF3Rgz3N5E80CQCZ/eByWL6r6w5q0TPtzTUnIQmsWabqmfdO+8eVYTdsl8BOnZXQn9T8 pWOA+CNddXvwE18GyJTmjmvQ4FbzLT1DE0/Fhoh9ihRr6huEGdtX0UwLmRUJszN19W8w MmCu7at5cPldfaKbWW0uHqg81rw2wLisVDsZCtJjfTZT7j7rNinDF562IIo4bhuf1y/0 vXgAzsNKspYvJg8YRjRk1ESnjA8aa7S8Gle+CSlAEcrJ8/JX/q2eSPw/py7CTi/oTkdg 7vyA== 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:in-reply-to:references:date :message-id:user-agent:mime-version; bh=Es42+SMOdcrVIIyQca0Jj78RPcAK/c9c7JVLwp5csAs=; b=0gP5MrYsnR8kJc7XIRwlR7qVG6U5ge6slw4NL+sS6286f1fd0sZkPQUGCCcOaoiUHA uqaFc9+22APklunqGFfMUyF1ow+IVEtSgONvUjQnnCekAOP7u15+ILy9+OE7phHE2ATi wTWVbrxHiuY94PiW0ei0PMkDj8L3XO908TgT7/Vgg5BGyDDCNmvV2ks8gcF8A+UqzNqz yPI4AmMkaO9IsJ0NahWJE4g4jnZQo95m5pHJWucfVcHrAlT7T6Un7E7MsZH/iqp1CdXb 0N1/c5krFAbwHascBLI07GnYZKojNljHxCi0U4f4RBf0e16xGJ2xHze523GXamOdDYvV EVLQ== X-Gm-Message-State: ACgBeo3s/OMZn/MWXf3pL7wy2JFfttd8+CItOIAzObfoe4pNsUpvwmaQ Ty3gt6P/HEhZsFABt0RZoSLibM2qSNYzbw== X-Google-Smtp-Source: AA6agR4CSEgryJCFe6I3IztCefuDDMyWoHPoQJqOTqI0CdKhRLz7bubrX7+ItyApp865lftlfzK0Tg== X-Received: by 2002:a17:907:2e01:b0:730:a098:7257 with SMTP id ig1-20020a1709072e0100b00730a0987257mr1756596ejc.705.1659433460018; Tue, 02 Aug 2022 02:44:20 -0700 (PDT) Original-Received: from ars3 (pd95c95b0.dip0.t-ipconnect.de. [217.92.149.176]) by smtp.gmail.com with ESMTPSA id r10-20020a1709061baa00b007308fab3eb7sm1700353ejg.195.2022.08.02.02.44.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 02:44:19 -0700 (PDT) In-Reply-To: <87sfmizump.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 30 Jul 2022 13:51:10 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=arstoffel@gmail.com; helo=mail-ej1-x62f.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, 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:292978 Archived-At: On Sat, 30 Jul 2022 at 13:51, Lars Ingebrigtsen wrote: > Philip Kaludercic writes: > >> That is obvious, the question is should package developers avoid using >> `define-key' if possible or not? > > As the doc string says -- `keymap-set' is the recommended function to > use. However, `define-key' is not (and won't be) obsoleted, so it's up > to them to follow the recommendation (or not). I didn't catch any of the previous discussion about keymap.el, but I have a comment -- sorry if redundant. Wouldn't it make sense to let keymap-set take multiple key-definition pairs as arguments, like setq et al? This would be very convenient e.g. in user configuration files, where currently one often finds long sequences of define-key calls. This looks much better to me: (keymap-set some-map "a" 'command-a "b" 'command-b "c" 'command-c)