From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Moving kbd to subr.el Date: Sun, 17 Oct 2021 21:55:58 +0200 Message-ID: <87czo3pgs1.fsf@gnus.org> References: <20211004081724.6281.11798@vcs0.savannah.gnu.org> <87h7dm9en7.fsf@gnus.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39793"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Stefan Kangas , emacs-devel@gnu.org To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 17 21:57:18 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 1mcCHW-000ABI-Fa for ged-emacs-devel@m.gmane-mx.org; Sun, 17 Oct 2021 21:57:18 +0200 Original-Received: from localhost ([::1]:37826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcCHV-0007aQ-8z for ged-emacs-devel@m.gmane-mx.org; Sun, 17 Oct 2021 15:57:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcCGO-0006BJ-Ed for emacs-devel@gnu.org; Sun, 17 Oct 2021 15:56:08 -0400 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:33344) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcCGK-0001bJ-CB for emacs-devel@gnu.org; Sun, 17 Oct 2021 15:56:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=L7MpOH6hOx9MFt4er03i2iMHEODQB4fqa7yyo70oDjc=; b=jGe2ozWrseA+ZDb195GBfFiuwg v/ga7n/48jhTfS7spMBt/h5Aoq0TBBg7pnEc2Z9PUfbVUGAUkNOh93nly+kTQ+6mMALgHaT7tVcaf yNKLOQ1wXDzI1ze0qOXTXO+tn6FZknQMnWOXPpYmk8OsOzAaP868tNI0GRKKQWmP/K0w=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mcCGF-0004B9-3b; Sun, 17 Oct 2021 21:56:01 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAM1BMVEX+/v3v7+m4xdHO 1dmpucmVr8SNo7NylbBUdo5nW07Rt5eqi2iTdVaPbEuJYj1xUjj///8WiFWLAAAAAWJLR0QQlbIN LAAAAAd0SU1FB+UKERMxM0+lc0cAAAGcSURBVEjHrZYJcsMgDEXD4gUHwf1vWwmJNTTG077JYAf+ l4TsMHm9WtTrIY8Na1G1MvcqowhxqPtKlDJqRfdPe/jKM8OTDEMz2hBqHZP6j5c5ejJHKYz+lc6e YIORJZLM1Z3hs6QPk3yz1s4NJq1Zq6swkw0STE8kPckgmt9VlKwxGPuAZcOG0FieQy1o64rYRIzs hGy62WheFUHhYDhDEfaLM8igUXisIobvojatGLax4p5mMe1h61gwlNZ8TTMYUpVW1RdRm/6lknBp D3lD535/wtBgz/PAz3G6XQ2/9U9xMpT+2bWDDMML+82RIYfA4QpXbsa74j1+vAeAgAo6Z3bHEyEG mmWgDgm+D5EMlwQiF/rSxcNA4FDV4DPgp+oYQyTEUOSSKMN3XEyshqTLZbTxPceOWR1zSb6Ey+qU RgbOIjbJEBxgi1xaRsGbxhD8mBHJGXyIzawvYQOkUiDiBCp84AzYpaqmdZBuxQHHJQG1Fcq+wLl8 z/1vLU1bITQr5V423BnMdfHDvvgp8GOs71F+EahIt/Cf4c/8AACRLThqqm+MAAAAJXRFWHRkYXRl OmNyZWF0ZQAyMDIxLTEwLTE3VDE5OjQ5OjUxKzAwOjAwvE28RAAAACV0RVh0ZGF0ZTptb2RpZnkA MjAyMS0xMC0xN1QxOTo0OTo1MSswMDowMM0QBPgAAAAASUVORK5CYII= X-Now-Playing: 33.3's _Plays Music_: "An Evening in Park Slope" In-Reply-To: <31b2f1e94178d73e5f05@heytings.org> (Gregory Heytings's message of "Sun, 17 Oct 2021 19:32:26 +0000") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, 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:277233 Archived-At: 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 "" 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... > (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? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no