From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: map-char-table, optimize-char-table and `equal' comparisons Date: Sat, 10 May 2008 16:21:27 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1210450913 32005 80.91.229.12 (10 May 2008 20:21:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 May 2008 20:21:53 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 10 22:22:30 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JuvaH-0007jv-Pi for ged-emacs-devel@m.gmane.org; Sat, 10 May 2008 22:22:22 +0200 Original-Received: from localhost ([127.0.0.1]:40165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JuvZZ-0004NG-4c for ged-emacs-devel@m.gmane.org; Sat, 10 May 2008 16:21:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JuvZU-0004Mx-JE for emacs-devel@gnu.org; Sat, 10 May 2008 16:21:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JuvZS-0004Mk-4N for emacs-devel@gnu.org; Sat, 10 May 2008 16:21:31 -0400 Original-Received: from [199.232.76.173] (port=55788 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JuvZR-0004Mg-W0 for emacs-devel@gnu.org; Sat, 10 May 2008 16:21:30 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:42205 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JuvZR-0000Hi-OU for emacs-devel@gnu.org; Sat, 10 May 2008 16:21:29 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgIDAIqgJUjO+KNfdGdsb2JhbACBU5A3ASeYCg X-IronPort-AV: E=Sophos;i="4.27,466,1204520400"; d="scan'208";a="20225150" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 10 May 2008 16:21:28 -0400 Original-Received: from pastel.home ([206.248.163.95]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id QZF13228; Sat, 10 May 2008 16:21:28 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id D85308182; Sat, 10 May 2008 16:21:27 -0400 (EDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:96944 Archived-At: 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