unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: Jonathan Ganc <jonpublic2@gmail.com>
Cc: 8807@debbugs.gnu.org
Subject: bug#8807: map-char-table alters cons cells used as events
Date: Mon, 06 Jun 2011 16:04:21 +0900	[thread overview]
Message-ID: <tl7zklvbfuy.fsf@m17n.org> (raw)
In-Reply-To: <4DEC5C8B.3030803@gmail.com> (message from Jonathan Ganc on Sun,  05 Jun 2011 23:50:19 -0500)

In article <4DEC5C8B.3030803@gmail.com>, Jonathan Ganc <jonpublic2@gmail.com> writes:

> In using map-char-table, I've encountered something which is either a 
> bug or at least unexpected to me. Here is a minimal listing producing 
> the result:

> (let ((ct (make-char-table 'keymap)) permev)
>    (set-char-table-range ct '(1 . 2) 'binding)
>    (map-char-table
>     (lambda (event defn)
>       (setq permev event)
>       (insert (prin1-to-string permev)))
>     ct)
>    (insert (concat "\n" (prin1-to-string permev)))
>    )

> This produces:
> (1 . 2)
> (3 . 4194303)
> , so that map-char-table alters the cons cell being used as an output 
> range than producing a new one. I would have expected:
> (1 . 2)
> (1 . 2)
> Is this the desired behavior?

Considering the efficiency (by reducing cons cell creation),
it is the desired behavior.

---
Kenichi Handa
handa@m17n.org





      parent reply	other threads:[~2011-06-06  7:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06  4:50 bug#8807: map-char-table alters cons cells used as events Jonathan Ganc
2011-06-06  6:57 ` Eli Zaretskii
2011-06-06  7:04 ` Kenichi Handa [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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=tl7zklvbfuy.fsf@m17n.org \
    --to=handa@m17n.org \
    --cc=8807@debbugs.gnu.org \
    --cc=jonpublic2@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).