all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Justin Burkett <justin@burkett.cc>
To: rswgnu@gmail.com
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Proposed patch for lookup-key
Date: Thu, 14 Dec 2017 16:25:58 -0500	[thread overview]
Message-ID: <CAF8XuLh8Z+wOLL1CiZLbnSrMYcpGxnR7nVET2eYP5ZsvAGcm3Q@mail.gmail.com> (raw)
In-Reply-To: <CA+OMD9h4zeAuiNrFatSZW799fgFAqK7U+vCVLCZe=YzO2MS46w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 763 bytes --]

> 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 <rsw@gnu.org> 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
>
>

[-- Attachment #2: Type: text/html, Size: 1927 bytes --]

  reply	other threads:[~2017-12-14 21:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14 19:44 Proposed patch for lookup-key Justin Burkett
2017-12-14 21:07 ` Robert Weiner
2017-12-14 21:25   ` Justin Burkett [this message]
2017-12-15  1:31 ` Justin Burkett
2017-12-15  2:57 ` Stefan Monnier
2017-12-15 14:55   ` Justin Burkett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAF8XuLh8Z+wOLL1CiZLbnSrMYcpGxnR7nVET2eYP5ZsvAGcm3Q@mail.gmail.com \
    --to=justin@burkett.cc \
    --cc=emacs-devel@gnu.org \
    --cc=rswgnu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.