From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Justin Burkett Newsgroups: gmane.emacs.devel Subject: Re: Proposed patch for lookup-key Date: Thu, 14 Dec 2017 16:25:58 -0500 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c091cbab8d34f0560538781" X-Trace: blaine.gmane.org 1513286825 9717 195.159.176.226 (14 Dec 2017 21:27:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 14 Dec 2017 21:27:05 +0000 (UTC) Cc: emacs-devel To: rswgnu@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 14 22:27:01 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePb1x-0002GK-5g for ged-emacs-devel@m.gmane.org; Thu, 14 Dec 2017 22:27:01 +0100 Original-Received: from localhost ([::1]:43105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePb24-0005sf-5A for ged-emacs-devel@m.gmane.org; Thu, 14 Dec 2017 16:27:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePb12-0005qC-V9 for emacs-devel@gnu.org; Thu, 14 Dec 2017 16:26:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePb0y-0004rE-Iv for emacs-devel@gnu.org; Thu, 14 Dec 2017 16:26:04 -0500 Original-Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:45848) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ePb0y-0004qD-5y for emacs-devel@gnu.org; Thu, 14 Dec 2017 16:26:00 -0500 Original-Received: by mail-wm0-x22f.google.com with SMTP id 9so13906521wme.4 for ; Thu, 14 Dec 2017 13:26:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burkett-cc.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ef068RQivIdbxdMtMJ0aTzUX+TX0h8CbNo2qFdCFOTE=; b=Ph41/9Ok9Tg/c9TM01JKsEiDydrhOtUf8BndrowBz9/A4q0z9gN0T0i0SaQLIFutbI bqb4maFCtW4f3SRVVmq2eTrtYYucxsZRI3jXg1qpDST6a2LPz6jHkM77cHckP/Afe5hu y8ofW6lYjfawjI1RTXcHJ+32MTAaSsf/SGbxU1g8FrDIGe9ayxg1bj2XpEzt1venq0wO UfPHSpcdVQh0HjBVFBBilSeQfvCGKK9d0C8CVcOXGFFiAEBRO8uU9S9TLtgY+lk6z2W1 kqRc3oSN9lJXRTb8QwIRVDLMG7ZX+2jeoVmerKR0xUwNU3vizfPMdcwjsUrTi8kpaBL/ L9Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ef068RQivIdbxdMtMJ0aTzUX+TX0h8CbNo2qFdCFOTE=; b=HNWZpLr96WK2NwZU9JZtnwnXNpEF6Qh/eDo+IG3dp4A+5g8scMEW8eE82zVXcIcsHE Z+wEsBhCXOELYo96QfQ8PT43Y4l7oGqYuTnwQXzYlrIzG20kc+KsCk0q8OcJZYWTM4gL IKArnT19adX2UH4PYH9fr+Io0gqpOiDmC6N4ecNH9/oWE/PG3ROfAqI7RvLMob+xkZ0y EA7phX3USVCcnxqItFvmYU1wmnWPvwowix/l0eS/1FcqbPwsMBlDso8N2P8+yL5bKIyV uZGCslMWVyXXHyuuLMfoBQwDj/yYamIOraHgU1B6/srqyFxbe0hN1iohM4BK1a1fC+9r in7w== X-Gm-Message-State: AKGB3mIsJlBX97RsyH3ftxvdMgXXL1s0oaEOWREnLptY2OLdsvuV+NVS Yv77z+YpKFgukM9rLrHMfO9f7Lb3+Tk+8uZl2S0UCg== X-Google-Smtp-Source: ACJfBot81p2iiWn1fbc2zFF5+tx8ueDyrwmVZ9U6AhPAI0vFsBrXAcm+P+GU2LHEI+w1ropkuOGrIALN5750N4sVq7A= X-Received: by 10.80.244.194 with SMTP id v2mr14314118edm.68.1513286759135; Thu, 14 Dec 2017 13:25:59 -0800 (PST) Original-Received: by 10.80.132.101 with HTTP; Thu, 14 Dec 2017 13:25:58 -0800 (PST) X-Originating-IP: [152.17.116.29] In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221067 Archived-At: --94eb2c091cbab8d34f0560538781 Content-Type: text/plain; charset="UTF-8" > How about showing what the lookup-key output looks like before and after your patch when a menu is involved? Sure, (define-key map "a" '("Foo function" . foo)) This is the behavior from before (the second sets the new optional arg to nil) (lookup-key map "a") => foo (lookup-key map "a" nil nil) => foo With the new last argument set to t, (lookup-key map "a" nil t) => ("Foo function" . foo) The motivation for this patch was to be able to easily retrieve ("Foo function" . foo) in a case like this. Best, Justin On Thu, Dec 14, 2017 at 4:07 PM, Robert Weiner wrote: > Nice effort for a first contribution! > > How about showing what the lookup-key output looks like before and after > your patch when a menu is involved? > > Bob > > --94eb2c091cbab8d34f0560538781 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
>=C2=A0How about showing what the lookup-key output looks li= ke before and after your patch when a menu is involved?
Sure,=C2=A0

(define-key map "a" '(= "Foo function" . foo))

This is the behav= ior from before (the second sets the new optional arg to nil)
(lookup-key map "a") =3D> foo
(looku= p-key map "a" nil nil) =3D> foo

With = the new last argument set to t,=C2=A0

(lookup-key = map "a" nil t) =3D> ("Foo function" . foo)

The motivation for this patch was to be able to easily retr= ieve ("Foo function" . foo) in a case like this.=C2=A0
=
Best,=C2=A0
Justin=C2=A0

=


On Thu, Dec 14, 2017 at 4:07 PM, Robert Weiner = <rsw@gnu.org> wrote:
Nice effort fo= r a first contribution!

How about showing what the lookup-key output= looks like before and after your patch when a menu is involved?

Bob=


--94eb2c091cbab8d34f0560538781--