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: The new keymap functions Date: Sat, 13 Nov 2021 07:56:12 +0100 Message-ID: <87zgq8sfw3.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="34710"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 13 07:57:00 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 1mlmyB-0008oC-Iq for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Nov 2021 07:56:59 +0100 Original-Received: from localhost ([::1]:34080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mlmyA-0005rT-6B for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Nov 2021 01:56:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlmxa-0005CL-Kl for emacs-devel@gnu.org; Sat, 13 Nov 2021 01:56:22 -0500 Original-Received: from [2a01:4f9:2b:f0f::2] (port=33788 helo=quimby.gnus.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlmxZ-00072q-52 for emacs-devel@gnu.org; Sat, 13 Nov 2021 01:56:22 -0500 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:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=CsfPjrb7LkpPuIayCSRLhOwWLXtFFIAsyz4EN2MA6J0=; b=Lv8zfb1e4o2pidPcKeDWezekvj cKJbyFtPnzglq9AOT9VuIH4GlX7FiCR1leNstYaeicLYEIm9egeL1K4hRTltUF0nttaxnf6NvF17C z7yjqjNFA53zLliKBYCDRm/E0m+4yTQt55sSPQ4PiOzN9Tx7Pu4X4fnaq4M1a5eLC8WI=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mlmxQ-0006Ot-Gy for emacs-devel@gnu.org; Sat, 13 Nov 2021 07:56:16 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUbEhRYQkaXkJj/ //+8eqrzAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+ULDQYwLgj6jtMAAAGhSURBVCjPZZKxbtswEIZ/ ClKAbEogBnGnokiApE9xBtqdMnhBqylDHCR+CnnJrEEyak92IQrRPWWPTLYeQJCfdIf7fx4BmJ81 e2ZoGGb/sesmHzHoYkwyHPQwy3yvMLUHCbIX2QQIUyPhnqfTRvDmsJJdxdPAa2zZLN+/L500hUVb cPtyZ8heKwAnWh0trUrEfjVlI9PK5ZVC7ox7dKZb+yjHAWVpWgXLo0OKRyj0+KQIzpw0kz9V76Ji bynBwMxmjC2nQ1gr1O9W08LQWZHA+1TT05VaG2avNTtPlzJv+uOt1mw7ujxMv5lK/dNmqA/PvYpU IHNzOzdjCZxHDTf5+GWpis5NpGrxNckrIlyfjcZZ5jMUZGFGKpkbQsEL5B7Vw9C0sKPPpAOaoD4K rxBUKjurplyWxvAggmFOEEciOL0iC3J8ThBey2yeu6tJP2D3h4wEupj33Tdsf8H8HehCvHanBUz3 9KN+66kCZVCVtm6X5KKlaIPajNPF5nrxRHgpkx9deqhctHQH+JgSL5x1RnEsVaXwpA8n1Zb4P1x6 WPgHO3ChS2FLHGwAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMTEtMTNUMDY6NDg6NDUrMDA6MDDS xgtrAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTExLTEzVDA2OjQ4OjQ1KzAwOjAwo5uz1wAAAABJ RU5ErkJggg== X-Now-Playing: Talking Heads's _The Name Of This Band Is Talking Heads (Disc 1: 1977-1979)_: "Memories (Can't Wait)" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a01:4f9:2b:f0f::2 (failed) Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 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, RDNS_NONE=0.793, 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.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:279302 Archived-At: As previously discussed, we wanted to add make the Emacs key binding machinery easier to understand, and go for a single syntax for bindings. This entails adding a bunch of new functions, since the old functions should continue to work as before. The most difficult thing here is naming, of course, but after much discussion, I've settled on these: keymap-set keymap-local-set keymap-global-set keymap-local-unset keymap-global-unset keymap-lookup define-keymap and defvar-keymap keep their names, but use the `kbd-valid-p' syntax. In addition, `kbd' has been refactored, and the new name `key-parse' has been defined -- which is like `kbd', but always returns a vector. Finally, the -unset functions remove the bindings instead of setting them to nil. I've added the functions and converted the few define-keymap instances that are in-tree to the new syntax, but wanted to give all y'all a chance to discuss this further for a couple of days before I push these changes. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no