From 127827c013b6b4fc78ee1362a695b7a7e8890e02 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 11 Oct 2011 13:32:38 -0400 Subject: [PATCH] * minibuf.c (Finternal_complete_buffer): Fix last change. Fixes: debbugs:9709 --- src/ChangeLog | 4 ++++ src/minibuf.c | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) 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) == ' ') -- 2.11.4.GIT