From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ryan Barrett Newsgroups: gmane.emacs.bugs,gmane.emacs.devel Subject: Re: bug in minibuffer-complete-and-exit, fix included Date: Wed, 28 Dec 2005 12:19:19 -0800 (PST) Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: sea.gmane.org 1135801202 811 80.91.229.2 (28 Dec 2005 20:20:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 28 Dec 2005 20:20:02 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, emacs-devel@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 28 21:20:01 2005 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Erhlv-00019m-Nz for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Dec 2005 21:19:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ErhnE-00014p-VC for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Dec 2005 15:21:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ErhnD-00014R-Ed for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2005 15:21:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ErhnB-00013x-WF for bug-gnu-emacs@gnu.org; Wed, 28 Dec 2005 15:21:03 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ErhnB-00013t-SD; Wed, 28 Dec 2005 15:21:01 -0500 Original-Received: from [216.239.45.12] (helo=smtp-out.google.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1ErhnP-0001pa-Og; Wed, 28 Dec 2005 15:21:16 -0500 Original-Received: from vegeta.corp.google.com (vegeta.corp.google.com [172.24.0.3]) by smtp-out.google.com with ESMTP id jBSKJWAf004056; Wed, 28 Dec 2005 12:19:32 -0800 Original-Received: from heaven.corp.google.com (dhcp-172-22-86-237.corp.google.com [172.22.86.237]) by vegeta.corp.google.com with ESMTP id jBSKJJZq015383 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 28 Dec 2005 12:19:20 -0800 X-X-Sender: ryanb@heaven.corp.google.com Original-To: Stefan Monnier In-Reply-To: X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:14685 gmane.emacs.devel:48451 Archived-At: On Tue, 27 Dec 2005, Stefan Monnier wrote: >> ! && EQ (XFASTINT (Flength (val)), XFASTINT (Flength (compl)))) ... > This patch doesn't make any sense: EQ takes two args of type Lisp_Object > (which is also the type returned by Flength), whereas XFASTINT takes > a Lisp_Object and returns an int. understood, and apologies. it was my first foray into the C source. :P EQ is defined in lisp.h to be ==: #define EQ(x, y) ((x) == (y)) or #define EQ(x, y) ((x).i == (y).i) i spent some quality time with gdb, and noticed that even when val and compl were the same length, the Lisp_Objects returned by Flength for them weren't equal. specifically, EQ (Flength (val)), Flength (compl)) evaluated to false. i'm not sure why that was. however, when i coerced the returned Lisp_Objects to ints with XFASTINT, they were equal. i don't know why CVS didn't reproduce the bug for you. i'll look into it. if i was mistaken, and it is fixed, i'll drop it. if it's still a bug, though, i could change the patch to use == instead of EQ. would that be more palatable? ! && XFASTINT (Flength (val)) == XFASTINT (Flength (compl))) -Ryan -- http://snarfed.org/