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: The new keymap functions Date: Sat, 13 Nov 2021 16:24:47 +0100 Message-ID: <87fss0hydc.fsf@gnus.org> References: <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="21611"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 13 16:28:24 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 1mlux6-0005Ox-JR for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Nov 2021 16:28:24 +0100 Original-Received: from localhost ([::1]:58552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mlux5-0002rV-JX for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Nov 2021 10:28:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlutk-0007Ke-DA for emacs-devel@gnu.org; Sat, 13 Nov 2021 10:25:00 -0500 Original-Received: from [2a01:4f9:2b:f0f::2] (port=37912 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 1mluti-0001e2-2A for emacs-devel@gnu.org; Sat, 13 Nov 2021 10:24:56 -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: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=aU6hgaSMYykJUE/GH9YIyPoYLuVykAPznxFtjQ65kGs=; b=nqtiQudhoHvL+ABnCeMguN5yfF 7G2mTUkXDDHTrK34T1xTFqIBqW+YGBguoZ66lrcd97khkortec2Xsxkhws4GtqfEQzcnNrbn10N5R WFyKFWaAlSsPi1d6rVWzy5WsvSk/LM7Q9H+w1yA/xDTk7V09PElevR8RZvq6XKNou4Vc=; 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 1mlutc-0001V1-D9; Sat, 13 Nov 2021 16:24:50 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEU5EhmlHxbGoGj/ ///XVDo6AAAAAWJLR0QDEQxM8gAAAAd0SU1FB+ULDQ8VAUQJWOIAAAFBSURBVCjPdZHBaoNAEIb/ CWspPa2wPkBLC8GnWCFCjy7s9h2Sp0g9hB7bS6E9GQ9B5yk7u0bjpeNlPgc//hkBwq6Ch86ogiYo C2O1IkKB4Br7FvxXXcE1+3HYf18uh/cCzo38cWD+3Qv4PNxrUqSaSkMehViqAvIZdhbwRu8SIFgE H1zqG29Q+6BjT85LDJOHNKnq/2xqstUJrEu2ABoWW643PFxtWdB05sd8smUaZ+5kX1ku2lhAbCZl Y/7E1WaIuYq2TGwGPGSLTYDyadOMBFK2aBMYsbKNbrHhMNDNVkaYbSXTnA0ywZQtbwS6tKkxhaxZ HuUiFt7b6YZQ0Ya5xFYsMLmWKtTckfxavbwXm13AxOEN9Op7aLtSF3Y1eX59+bk/ndq+63s5BfOW e247OUopwPxUJsB2w5uH46blu/YPkR5ipM53k5UAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMTEt MTNUMTU6MjE6MDErMDA6MDCWpk2zAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIxLTExLTEzVDE1OjIx OjAxKzAwOjAw5/v1DwAAAABJRU5ErkJggg== X-Now-Playing: Jerry Harrison's _The Red And The Black_: "Magic Hymie" In-Reply-To: (Stefan Monnier's message of "Sat, 13 Nov 2021 10:09:23 -0500") 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:279330 Archived-At: Stefan Monnier writes: > I hope you do that by changing the C code of `define-key`, because doing > it right from outside of it is hard (see recent discussion about it). I missed that bit of the discussion (I only saw the first bugfix post): > Actually, it's not guaranteed. Try it with: > > (let ((parent (make-sparse-keymap)) > (child (make-keymap))) > (set-keymap-parent child parent) > (define-key parent [?a] nil) > (define-key child [?a] 'bar) > child) So the function as posted didn't work in that case... hm... yes, I guess it has to be done in C. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no