From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: bug/feature - emacs doesn't tell you about keys with multiple prefixes Date: Tue, 18 Mar 2003 11:16:20 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200303181616.h2IGGLjN018636@rum.cs.yale.edu> References: <15932.56789.564317.739477@hkn.eecs.berkeley.edu> <200303161014.h2GAE90Q009917@rum.cs.yale.edu> <200303171635.h2HGZSJw013765@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1048004258 27855 80.91.224.249 (18 Mar 2003 16:17:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2003 16:17:38 +0000 (UTC) Cc: Stefan Monnier Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Mar 18 17:17:34 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18vJmQ-0007F3-00 for ; Tue, 18 Mar 2003 17:17:34 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18vJml-0003jH-00 for ; Tue, 18 Mar 2003 17:17:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18vJlc-0007V3-06 for emacs-devel@quimby.gnus.org; Tue, 18 Mar 2003 11:16:44 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18vJlS-0007K6-00 for emacs-devel@gnu.org; Tue, 18 Mar 2003 11:16:34 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18vJlQ-0007Fa-00 for emacs-devel@gnu.org; Tue, 18 Mar 2003 11:16:32 -0500 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18vJlG-0006kG-00; Tue, 18 Mar 2003 11:16:22 -0500 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with ESMTP id h2IGGLPe018638; Tue, 18 Mar 2003 11:16:21 -0500 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h2IGGLjN018636; Tue, 18 Mar 2003 11:16:21 -0500 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Richard Stallman Original-cc: quarl@hkn.eecs.berkeley.edu Original-cc: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12442 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12442 > The new code has a bug: it finds just the last occurrence of the same > keymap and tests whether the prefix for that occurrence is an initial > segment. What if the last occurrence isn't but another occurrence is? > In that case, it won't detect the cycle. I suspect that when M-a, > M-b, and M-a M-b are the same keymap, this code won't compare the M-a > with the M-a M-b. > > It can't use rassq now; it has to check each previous occurrence of the same > keymap. Huh?! That's exactly what the code does. I verified it correcly breaks such cycles before posting the message. And there's even a comment about it. Stefan