[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
map-char-table, optimize-char-table and `equal' comparisons
From: |
Stefan Monnier |
Subject: |
map-char-table, optimize-char-table and `equal' comparisons |
Date: |
Sat, 10 May 2008 16:21:27 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Both map-char-table and optimize-char-table compare consecutive values
using `equal' to determine whether to merge them into ranges.
I can see that it may sometimes be useful, but it is dangerous since it
may lose object identity information (obviously) and more importantly
because `equal' can fail when comparing cyclic objects.
I happened to be manipulating char-tables that map chars to other
char-tables, sometimes in cyclic ways and that makes it impossible to
use map-char-table ;-(
Any objection to changing the internal comparison predicate to `eq'?
Stefan
- map-char-table, optimize-char-table and `equal' comparisons,
Stefan Monnier <=