unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8807: map-char-table alters cons cells used as events
@ 2011-06-06  4:50 Jonathan Ganc
  2011-06-06  6:57 ` Eli Zaretskii
  2011-06-06  7:04 ` Kenichi Handa
  0 siblings, 2 replies; 3+ messages in thread
From: Jonathan Ganc @ 2011-06-06  4:50 UTC (permalink / raw)
  To: 8807

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? (I understand that I can work around this 
behavior by manually copying the cons cell.)

Thanks,
Jonathan


__________ Information from ESET Smart Security, version of virus signature database 6182 (20110605) __________

The message was checked by ESET Smart Security.

http://www.eset.com







^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-06-06  7:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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).