all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 5481@debbugs.gnu.org, Dani Moncayo <dmoncayo@gmail.com>
Subject: bug#5481: 23.1; insert-kbd-macro: does not write key-binding code
Date: Wed, 03 Mar 2010 15:45:33 -0500	[thread overview]
Message-ID: <87tysxyw0i.fsf@stupidchicken.com> (raw)
In-Reply-To: <jwvwrxtcghi.fsf-monnier+gnus-read-ephemeral-bug@gnu.org> (Stefan Monnier's message of "Wed, 03 Mar 2010 15:13:49 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I see the problem.  On further examination, there was already code in
>> macro.el that was supposed to handle this, but it was broken.  I've
>> checked in a fix.  Thanks for the bug report, and for the follow-up.
> [...]
>>   * src/keymap.c (Fwhere_is_internal): Use Fequal to compare
>>   definitions, so that keyboard macros are correctly handled
>>   (Bug#5481).
>
> Could you explain why Fequal is necessary there?  It should only make
> a difference if we're comparing one macro (ie. vector) against another
> identical macro, but IIUC that shouldn't be the case here.

We are indeed comparing one macro against another macro.  For a macro
bound to a key, (key-binding KEY-BOUND-TO-A-MACRO) returns the lambda
form of the macro.  The function where_is_internal_1 uses Fequal
(keymap.c:3001), and it locates the correct binding if you give the
lambda form as the `definition' argument.

But the binding found by where_is_internal was tossed aside in
Fwhere_is_internal because the result of shadow_lookup was compared
using EQ---clearly an incorrect step.  That's the part I changed.






      reply	other threads:[~2010-03-03 20:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26 17:35 bug#5481: 23.1; insert-kbd-macro: does not write key-binding code Dani Moncayo
2010-01-29 18:57 ` bug#5481: The same bug appears in another system: Ubuntu 9.10 Dani Moncayo
2010-03-03 14:32 ` bug#5481: 23.1; insert-kbd-macro: does not write key-binding code Dani Moncayo
2010-03-03 16:08   ` Chong Yidong
2010-03-03 16:20     ` Dani Moncayo
2010-03-03 17:32       ` Chong Yidong
2010-03-03 20:13         ` Stefan Monnier
2010-03-03 20:45           ` Chong Yidong [this message]

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=87tysxyw0i.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=5481@debbugs.gnu.org \
    --cc=dmoncayo@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /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.