From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: master c9cb59b 2/2: * etc/TODO: Entry about converting to defvar-keymap. Date: Fri, 10 Dec 2021 22:20:20 -0800 Message-ID: References: <83ilvwsdxg.fsf@gnu.org> <83ee6ks8rn.fsf@gnu.org> <87zgp7x2qq.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18623"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 11 07:21:44 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 1mvvlP-0004g9-VF for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Dec 2021 07:21:43 +0100 Original-Received: from localhost ([::1]:47332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvvlO-0004az-Ea for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Dec 2021 01:21:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvvk7-0003nn-NY for emacs-devel@gnu.org; Sat, 11 Dec 2021 01:20:23 -0500 Original-Received: from mail-pl1-f175.google.com ([209.85.214.175]:33309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvvk6-0002io-6p; Sat, 11 Dec 2021 01:20:23 -0500 Original-Received: by mail-pl1-f175.google.com with SMTP id y7so7720109plp.0; Fri, 10 Dec 2021 22:20:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=ioMwuJ4ZzRB+kruimJygsvJbe4xee8NOitcnpz+FfpA=; b=bz+KyMrtcQhEtiI6y6ncDB63wp9VgMRHJYuufGu2y8UTRGz8mn34CM9Ad0CxNfVscV rn0GARDnrLrMo/rx9ySO5Q7/1HIX4bbnLp9LhTnC9/YqFaXLYnrhDi0C/huQJo2QXa5m oh94ckqlz18ilUeZr1Pt70CXSr6v4xiU1AaXPG5/GM0JDgCG8fujODKirMk0CGWSaM6R pvG8sS2QSt5vva2oKcAHhEr6aopSB4DVchMlkYivXAM6yWr1Xdhou6s5triOM/AdHdIw n79acJxSgwtyw35UGqHNSExhye6OZiLAnFYO0LNnL45csCffQ49dXjoLfKr/YYIGsAze ePNw== X-Gm-Message-State: AOAM532II7gemuDduWuP7yYbTfhE1G8VxIeuRdoMynK7F28iD8ayedTY X30ymcVqsCflk6AZnGykgTdSVgFeWxeWzzRFMYA= X-Google-Smtp-Source: ABdhPJx8gHSDWNBXGV3Fr22cFqwDVEUjWNADgxifEBxuqZcHyzttCPNJSwpQjZT6AcLiSxKv9XgVlD61x46Elst1ZdA= X-Received: by 2002:a17:90a:4414:: with SMTP id s20mr29558438pjg.132.1639203620600; Fri, 10 Dec 2021 22:20:20 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 10 Dec 2021 22:20:20 -0800 In-Reply-To: <87zgp7x2qq.fsf@gnus.org> Received-SPF: pass client-ip=209.85.214.175; envelope-from=stefankangas@gmail.com; helo=mail-pl1-f175.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:281652 Archived-At: Lars Ingebrigtsen writes: > 2) The temptation to rewrite a map when doing adding a key or two is > great, but it makes that single commit harder to read. So converting > maps as a separate commit makes things easier to read, not harder. Agreed. (IMHO, often it is better to first make the cleanup, and then the logical change in a separate commit. My impression is that this style is not often used in Emacs development.) > While doing conversion to defvar-keymap, we'd also convert to #', which > gives us byte compilation support for mis-spelled commands. I found a > couple of bindings that pointed to commands that doesn't exist when > doing the few conversions that I've done. In addition to this, and keeping in mind also the other points you make, I think getting some experience with defvar-keymap will help stabilize and work out any problems in its interface well in advance of Emacs 29. For example, Bug#52374 was found by me poking at the keymaps in re-builder.el. Although presumably that bug would have been eventually been found anyways, it's always nice to discover such things early. I have the feeling that there might exist more bugs and opportunities for improvement that we haven't yet noticed.