From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: master 859190f 2/3: Convert some keymaps to defvar-keymap Date: Thu, 14 Oct 2021 13:58:15 -0700 Message-ID: References: <20211004081724.6281.11798@vcs0.savannah.gnu.org> <818f9907c2b1fe8b54b1@heytings.org> <83tuhlnkxm.fsf@gnu.org> <818f9907c2f359a71f49@heytings.org> <83czo9nj4g.fsf@gnu.org> <818f9907c244b9db0bea@heytings.org> <834k9lnd2i.fsf@gnu.org> <818f9907c2dff3b49971@heytings.org> <83k0ign3zj.fsf@gnu.org> <818f9907c26fb6f0233a@heytings.org> <838rywm7a7.fsf@gnu.org> <9865db3af5547c6ca15c@heytings.org> <9865db3af561bf9f05d1@heytings.org> <87mtnbv2q1.fsf@gnus.org> <87h7djv0j4.fsf@gnus.org> <87czo7uyxl.fsf@gnus.org> <878ryvuylj.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6133"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gregory Heytings , Eli Zaretskii , Stefan Monnier , Emacs developers To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 14 22:59:30 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 1mb7p4-0001LD-LH for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Oct 2021 22:59:30 +0200 Original-Received: from localhost ([::1]:54396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mb7p2-0005DP-NX for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Oct 2021 16:59:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mb7nv-0003p3-NN for emacs-devel@gnu.org; Thu, 14 Oct 2021 16:58:19 -0400 Original-Received: from mail-pf1-f178.google.com ([209.85.210.178]:37610) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mb7nu-0008Sh-5s; Thu, 14 Oct 2021 16:58:19 -0400 Original-Received: by mail-pf1-f178.google.com with SMTP id q19so6544204pfl.4; Thu, 14 Oct 2021 13:58:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=nyjrX3t4Dp9ZAFjzokkMKemUp3lFTW36fOpYwaFdbvA=; b=SSgYsjmwQFjF84/j9s6EkYyluRyheIJtzxXBOuOgzhZW4txcTwVNwZp4Vt+f1QuyWY LPWrv3hcw2MF+B4Zji+sEHinsUYBmsF/eX2orqQUng6C7XDRJPABoUqPQ7SoDFPgVdUL 5SXpLuQ1BRbin1/hzFRRi0aGI07Lz+iAa+2lpfLY3flX5hPcn1GLM0AMNMTJM2YcwVh4 AQhJKetzzay9+n1MHwRbY7YFQJfrGWLfGG6xIJG+M+y5ig03rCt/Ibcg7DCfdI/1kwMh 0eEcSLTM2xZgOaP4O2rq6oYzINmDmUHnB5sabK1TVNyqCKFcK2DU7F8rbcuCbZZi12hA K7Ow== X-Gm-Message-State: AOAM533AZGruOjslrgzkYRGs6nzg7zB8b+IbUYT37WRjKRe2x7+pQkmZ KXoM1NQC5eP6y0AhpGnqxuHuN61TmF+vnaDvuuk= X-Google-Smtp-Source: ABdhPJxKsRuFbWuowkd9h6mcQhNudmHq+PXW8nxU+2o2MkEIMkTcnIP8L1j48kNkMYJXLl66i0q32Iz4wiUnOtPl7vI= X-Received: by 2002:a05:6a00:1950:b0:44d:9402:3396 with SMTP id s16-20020a056a00195000b0044d94023396mr755893pfk.70.1634245096443; Thu, 14 Oct 2021 13:58:16 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 14 Oct 2021 13:58:15 -0700 In-Reply-To: <878ryvuylj.fsf@gnus.org> Received-SPF: pass client-ip=209.85.210.178; envelope-from=stefankangas@gmail.com; helo=mail-pf1-f178.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:277060 Archived-At: Lars Ingebrigtsen writes: > No, this is valid code: > > (local-set-key "f" > '(menu-item "Create Named Stash" vc-git-stash > :help "Create named stash")) > > It's a very odd way to call `vc-git-stash', but it's possible, I guess. > > So the [f] syntax would be ambiguous. > > (local-set-key [f] > '(menu-item "Create Named Stash" vc-git-stash > :help "Create named stash")) > > currently doesn't set any keys, but if we interpret [f] as a kbd > sequence, it would bind the `f' key. So this syntax might not fly. I imagine that this would be a new function, so in that case it seems to me that backwards compatibility is not a concern. Are you also discussing a new function here? On another note, I find it weird that we can bind keys to menu-items, but that is the only way to get at some functionality. This should probably be fixed. On a third note, why don't we just provide a better interface for creating menu items that is not based on pretending that a menu item like a key? Do we need to leak that implementation detail for some didactic reason, or something?