From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: scanner Date: Fri, 10 Apr 2020 16:43:10 -0400 Message-ID: References: <871rov7dmc.fsf@mnet-mail.de> <87y2r3qfiv.fsf@mnet-mail.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="47773"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Raffael Stocker Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 10 22:43:53 2020 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 1jN0VC-000CH3-Jr for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Apr 2020 22:43:50 +0200 Original-Received: from localhost ([::1]:38756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jN0VB-0001vr-M3 for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Apr 2020 16:43:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40418) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jN0Ue-0001V9-7V for emacs-devel@gnu.org; Fri, 10 Apr 2020 16:43:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jN0Uc-00043q-4k for emacs-devel@gnu.org; Fri, 10 Apr 2020 16:43:15 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:24939) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jN0Ub-00041S-Uc for emacs-devel@gnu.org; Fri, 10 Apr 2020 16:43:14 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2456610113D; Fri, 10 Apr 2020 16:43:13 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 82E91101072; Fri, 10 Apr 2020 16:43:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1586551391; bh=pu2/RahueJySVaQ+k4x6xXkf20Vt1VMG4BBb/4Lx/vw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Pi0IbXGb9SBoWi/DNr90B8DqVUvKTaBIPry2Lf/+BNjuyDc4oFyRswhoXMZTNvAjS zSMiQi3hBovM6jdZwX3gjUaW9JiXp8/gfvRBr7n1V1+oIAGZytY/D0iJdNRkt0bwSE U8jeLU0BefpUn5tC8zgV+mTn6079bHs0aTyRCkRNR8KPwQUrnbTXYTqZi6kVJZIzD2 kukq2uwkBGgkNVuTTS0TRsYPH08oru/koob2m11POUoIXOAtQUG7qSHDhlqbPSXCzB cVD4Bvzn0oQqHid7eDKJUIWuxIcz3MtxUh+Vics1zwkSl6SLw07ZW+SCCON6ft6sIl 8Xhjro+95Qvmg== Original-Received: from alfajor (unknown [104.247.241.114]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4B2FE1202F3; Fri, 10 Apr 2020 16:43:11 -0400 (EDT) In-Reply-To: <87y2r3qfiv.fsf@mnet-mail.de> (Raffael Stocker's message of "Fri, 10 Apr 2020 21:58:32 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 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:246804 Archived-At: >> I'm also wondering why you need all those `:key-sequence nil` in the men= u. >> Maybe it reflects a bug in our code? > The Elisp doc says in (info "(elisp) Extended Menu Items"):=20 > =E2=80=98:key-sequence nil=E2=80=99 > This property indicates that there is normally no key binding which > is equivalent to this menu item. Using this property saves time in > preparing the menu for display, because Emacs does not need to > search the keymaps for a keyboard equivalent for this menu item. AFAIK we never bother with this optimization. Finding the key-sequence is supposed to be very cheap (basically a hash-table lookup) because we pre-compute a "reverse table" from commands to key-bindings. [ This pre-computation is not that cheap but we the above keyword argument doesn't prevent its computation. ] > I just thought this is how it's done. I guess we should adjust the doc, thanks. Stefan