[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8807: map-char-table alters cons cells used as events
From: |
Jonathan Ganc |
Subject: |
bug#8807: map-char-table alters cons cells used as events |
Date: |
Sun, 05 Jun 2011 23:50:19 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 |
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
- bug#8807: map-char-table alters cons cells used as events,
Jonathan Ganc <=