bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8807: map-char-table alters cons cells used as events


From: Kenichi Handa
Subject: bug#8807: map-char-table alters cons cells used as events
Date: Mon, 06 Jun 2011 16:04:21 +0900

In article <address@hidden>, Jonathan Ganc <address@hidden> 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
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]