all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ryan Barrett <emacs@ryanb.org>
Cc: bug-gnu-emacs@gnu.org, emacs-devel@gnu.org
Subject: Re: bug in minibuffer-complete-and-exit, fix included
Date: Wed, 28 Dec 2005 12:19:19 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0512281217100.7085@heaven.corp.google.com> (raw)
In-Reply-To: <jwvd5jicxha.fsf-monnier+emacs@gnu.org>

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/

  reply	other threads:[~2005-12-28 20:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-27  8:38 bug in minibuffer-complete-and-exit, fix included Ryan Barrett
2005-12-27 16:36 ` Stefan Monnier
2005-12-28 20:19   ` Ryan Barrett [this message]
2005-12-29  3:13     ` Stefan Monnier
2005-12-29 17:10     ` Richard M. Stallman
2005-12-31  1:49     ` Ryan Barrett
2005-12-27 18:27 ` Stefan Monnier
2005-12-27 18:51   ` Kevin Rodgers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0512281217100.7085@heaven.corp.google.com \
    --to=emacs@ryanb.org \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.