From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: Moving kbd to subr.el Date: Sun, 17 Oct 2021 18:41:58 -0700 Message-ID: References: <20211004081724.6281.11798@vcs0.savannah.gnu.org> <87czoa9e7p.fsf@gnus.org> <878ryxakv9.fsf@gnus.org> <834k9km5no.fsf@gnu.org> <83k0iflsze.fsf@gnu.org> <874k9jzu7a.fsf@gnus.org> <874k9juy0r.fsf@gnus.org> <87mtnbtimj.fsf@gnus.org> <87wnmd13ny.fsf@gnus.org> <87sfx10xs6.fsf@gnus.org> <87h7dfpjn3.fsf@gnus.org> <31b2f1e94178d73e5f05@heytings.org> <87czo3pgs1.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=gb18030 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28802"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Gregory Heytings , Stefan Kangas , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 18 03:43:35 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 1mcHgd-0007Dv-0O for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Oct 2021 03:43:35 +0200 Original-Received: from localhost ([::1]:58244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcHgb-00007h-5L for ged-emacs-devel@m.gmane-mx.org; Sun, 17 Oct 2021 21:43:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcHfD-0006T2-Fn for emacs-devel@gnu.org; Sun, 17 Oct 2021 21:42:07 -0400 Original-Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:41618) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mcHfB-0002qv-DI for emacs-devel@gnu.org; Sun, 17 Oct 2021 21:42:07 -0400 Original-Received: by mail-pf1-x42f.google.com with SMTP id y7so13458497pfg.8 for ; Sun, 17 Oct 2021 18:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=8g2F+XLWv7EA+8kTmAQgizi6hU7r7zuTwumZn/zHjXY=; b=oAPob3jNZrwiXhoa1m3RxqrsWuUkpKQWGNvaQUPaA0Ftq73IVzwTrQXE/N+JjQkSD+ BGyuis0g0KHPw+dCNjE5OB64jWYPmpb62XNOpGYI1TVclENC7aK0MkZzXxwzyuN4Yabw WNGF0s9HPM2wbJLASFGkznRk3scMJnySWPs1tAWSDxBRVMaCRexRj12u6s2bAajonV/J mCPihpU1Lq/nX5A50ZDXJa97hgDjUGfWSgNRpQTLgnNKtFfL+LOE9dfmuJMe2ILuiicl XV+lsU+hIHDP6xpBje+mZNM4Rl0jnt+HRyPHhteF9eY0ST0lsFSvSzDAjDkY/s4cBDIQ WaVw== 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:content-transfer-encoding; bh=8g2F+XLWv7EA+8kTmAQgizi6hU7r7zuTwumZn/zHjXY=; b=RafrPOd1PWOCremtfVT/QSEJnmi1NWHP/q7wqZIDt9VVZ29laJoTM+ZJ+8b+32AgoI AbQw7Zix70uonbh9HQPs4YSOi7NC9cZgfTdrolfLGMOg7ZvDUfT/jmzTCKH7SXMSST7H iL/1wLBfsTWKMXWPnmaR7TJ4kTY9zP+Va65CxYFfGsssXUgLMyelHxKhYhs/dgrGFdb2 MpyxPIpau7aVx9HJbdBAAMrsaOWJEv8tYmX/5Np2uEwyitIrYEIHGWXaP5CVqFfA+pJH A6JeeuQ/9Su7ehMVpnWcJ6GBRk7TDKYiyALCErRProBuNhS3WM3f+0DG1TXp3YYVo5+9 7zjQ== X-Gm-Message-State: AOAM530vism4sp6zkfJdeGME0ZkrsH9kA0DTkxTCWiqjKOWorptqYs1r /VxcnlUaLIlAZ3gi0NSkq6GE04p824wIcti9 X-Google-Smtp-Source: ABdhPJyYICIEdDtqXLLqxY9c1AQawpF3bDeFVSagF5FmE5NanJkpBR9Cx6g9YQawgC6ZQRvzxNCtgg== X-Received: by 2002:a62:1c52:0:b0:44c:f1c3:9cb5 with SMTP id c79-20020a621c52000000b0044cf1c39cb5mr26251412pfc.14.1634521322364; Sun, 17 Oct 2021 18:42:02 -0700 (PDT) Original-Received: from raman-glaptop (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id z10sm536837pgv.81.2021.10.17.18.42.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Oct 2021 18:42:01 -0700 (PDT) In-Reply-To: <87czo3pgs1.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 17 Oct 2021 21:55:58 +0200") Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=raman@google.com; helo=mail-pf1-x42f.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 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:277250 Archived-At: Lars Ingebrigtsen writes: You effectively re-asked for what I asked about six months ago --- we really need a specification for what a valid key is that is not tangled up in the edmacro implementation of parsing out key strings. > Gregory Heytings writes: > >> A suggestion: >> >> (kbd-valid-p "") >> (kbd-valid-p "") >> >> should return t, and > > Good point. This does make one of the syntax checks either less > effective, or the syntax is ambiguous. I went with the latter, but I'm > not sure that's the right thing to do here. > > The kbd syntax is > > "C-M-" > > but allowing dashes inside the brackets means that=20 > > "" > > should be parsed as the key named "C-M-return" (which isn't really > possible). > > So I just added some special-casing to disallow the "" form > in kbd-valid-p. We'll see...=20 > >> (kbd-valid-p "<123>") >> >> should (I think) return nil. IOW, kbd-valid-p should use: > > I'm not sure -- can there be keys named "123"? I don't know what the > rules are here -- is there an authoritative source for the syntax of > these names somewhere? --=20 Thanks, --Raman(I Search, I Find, I Misplace, I Research) =817=A94 Id: kg:/m/0285kf1 =950=DC8