[Top][All Lists]

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

Re: bug in minibuffer-complete-and-exit, fix included

From: Ryan Barrett
Subject: Re: bug in minibuffer-complete-and-exit, fix included
Date: Wed, 28 Dec 2005 12:19:19 -0800 (PST)

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))
   #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)))



reply via email to

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