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: master 859190f 2/3: Convert some keymaps to defvar-keymap Date: Wed, 13 Oct 2021 01:23:06 +0200 Message-ID: <878ryxakv9.fsf@gnus.org> References: <20211004081724.6281.11798@vcs0.savannah.gnu.org> <20211004081727.4F24921048@vcs0.savannah.gnu.org> <871r4qcs8s.fsf@gnus.org> <87o87ubcnl.fsf@gnus.org> <87h7dm9en7.fsf@gnus.org> <87czoa9e7p.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="18011"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 13 01:24:03 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 1maR7q-0004Td-Mw for ged-emacs-devel@m.gmane-mx.org; Wed, 13 Oct 2021 01:24:02 +0200 Original-Received: from localhost ([::1]:50420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1maR7p-0004Y4-QP for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Oct 2021 19:24:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maR73-0003QP-IL for emacs-devel@gnu.org; Tue, 12 Oct 2021 19:23:14 -0400 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:33584) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1maR71-0000Rw-Sz for emacs-devel@gnu.org; Tue, 12 Oct 2021 19:23:13 -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=q6SPZ3jNgXk0iuwKeUalLaInObE7cVCc1iImrssXJs0=; b=LmUBHca960PWbdFz67NPk+OVrA TiO6LWzkk3gxMSoeMFGuAzyy3gXX0z9X5/2zEuwASEM2+w07QhnU5/ooL8knc0mff08dT07FJOOkJ nWJlnj+TP5jJl3DsVlk6uoCsBrbEloF/Li5BG8ufobXY/WB8k66tGRFUttNfi5+e0h4s=; 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 1maR6x-0002AQ-CT; Wed, 13 Oct 2021 01:23:09 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEVUVVCTdnGdnJfX 1dH///9MdrqSAAAAAWJLR0QEj2jZUQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB+UKDBcO C5oDxnsAAAGmSURBVDjLdZTRtdwwCESR0gDwGhCogpX67y0MyPY670T7Za6B8YCWqM1BzET04yxN RDwPUXMxSrASaETn3gCKMICJVEYBQxRPAdqpBCCe7zfdO0HTA3QS9REIgERI3xkAn6sHwBAU8AdQ yaKPztXcCqSsAxaAVo/lV6kApvPDjR7QDghVq748gdqVITp36ZoBXKNb6iULaStrJXBr8oDtxjfI uE+CYdYLfACoHYAEhsGewO+MvWaoAZgF6hvJF4AKnM9Sxy9yA7AEQ7+AqanDyKU+ulcxlBoePnWP d3qBchEZI6aHx38BLG/ONH6BUMpu0fbqUXsl6NHgpye4ZhXuMsAIW/UF4rHFTDDCBHIDAZoWSR0f +Owuh60+Y6Ih/AWydTiiBSw3Mbfdat/+LB3PoAByP8NDPkAO6H5SvD9ANHqbFuDO1wSNHRvVMQ2I oDId4IcWilGrpNjDjjGFAoJgORcBt+O6nhBD98Eb7QJ7PYATlNzt9Dpcl3PSesfj/2Dhpm3ixl9R ys3EiZL8ndDzZgLIb4DzobXv+c/9dWjPmUH83uA/5y/mIWk4t6fipgAAACV0RVh0ZGF0ZTpjcmVh dGUAMjAyMS0xMC0xMlQyMzoxNDoxMCswMDowMCa+ABMAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEt MTAtMTJUMjM6MTQ6MTArMDA6MDBX47ivAAAAAElFTkSuQmCC X-Now-Playing: John Lurie's _Music for "Stranger Than Paradise" and "The Resurrection of Albert Ayler"_: "Sad Trees" In-Reply-To: (Stefan Kangas's message of "Tue, 12 Oct 2021 14:34:02 -0700") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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:276847 Archived-At: Stefan Kangas writes: >>> In the current Emacs tree, we have >7K instances of define-key with a >>> string as a parameter, and 441 with (kbd ...). Actually, when thinking about this a bit more, perhaps the potential for confusion is radically lower than I first imagined. That is, (equal (kbd "\C-xf") (kbd "C-x f")) => t So even if somebody uses "\C-xf" in `define-keymap' (and we're running all the string values through `kbd'), then it won't actually break anything. If somebody's writing "C-x" to bind the three letter sequence `C - x', they'll be surprised, but I don't think anybody has ever bound such a sequence, so... On the fourth hand, perhaps this "it just works anyway" thing would make things even more confusing -- I mean, it'd "just work" no matter what syntax you use, except in rare corner cases. > Right, but how much of that is preloaded code, how much is unchanged > since the 1990's, how much is written by core developers who can't use > `kbd' due to bootstrap and just got out of the habit, etc.? Might be a lot due to the bootstrap sitch -- if you can't use it everywhere, then best avoid it to avoid surprises. > From a quick glance, it looks like the meat of this is in > `edmacro-parse-keys'. From there, you have a ton of calls to `cl-lib', > regexps and what have you. But nothing in there looks like it should be > impossible to get in shape, even for early bootstrap, does it? No, skimming that, it's much simpler than I imagined. Rewriting that and plonking it into subr.el would be nice. I mean, I think we should do that anyway, so that we can use `kbd' everywhere. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no