From: Stefan Monnier Date: Tue, 11 Oct 2011 17:32:38 +0000 (-0400) Subject: * minibuf.c (Finternal_complete_buffer): Fix last change. X-Git-Tag: emacs-pretest-24.0.91~152 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=127827c013b6b4fc78ee1362a695b7a7e8890e02;p=emacs.git * minibuf.c (Finternal_complete_buffer): Fix last change. Fixes: debbugs:9709 --- diff --git a/src/ChangeLog b/src/ChangeLog index 9cef045c029..f659c1157a1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-10-11 Stefan Monnier + + * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709). + 2011-10-08 Glenn Morris * callint.c (Fcall_interactively): Give a more explicit error for the diff --git a/src/minibuf.c b/src/minibuf.c index f082cc01d97..a44a6376472 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1859,9 +1859,10 @@ The arguments STRING and PREDICATE are as in `try-completion', /* First, look for a non-internal buffer in `res'. */ while (CONSP (bufs) && SREF (XCAR (bufs), 0) == ' ') bufs = XCDR (bufs); - if (NILP (bufs) && EQ (Flength (res), Flength (Vbuffer_alist))) - /* All bufs are internal, so don't trip them out. */ - return res; + if (NILP (bufs)) + return (EQ (Flength (res), Flength (Vbuffer_alist)) + /* If all bufs are internal don't strip them out. */ + ? res : bufs); res = bufs; while (CONSP (XCDR (bufs))) if (SREF (XCAR (XCDR (bufs)), 0) == ' ')