[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/minibuf.c,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/minibuf.c,v |
Date: |
Mon, 19 May 2008 11:22:45 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 08/05/19 11:22:44
Index: minibuf.c
===================================================================
RCS file: /sources/emacs/emacs/src/minibuf.c,v
retrieving revision 1.349
retrieving revision 1.350
diff -u -b -r1.349 -r1.350
--- minibuf.c 14 May 2008 07:49:44 -0000 1.349
+++ minibuf.c 19 May 2008 11:22:44 -0000 1.350
@@ -781,10 +781,10 @@
Lisp_Object histval;
/* If variable is unbound, make it nil. */
- if (EQ (SYMBOL_VALUE (Vminibuffer_history_variable), Qunbound))
- Fset (Vminibuffer_history_variable, Qnil);
- histval = Fsymbol_value (Vminibuffer_history_variable);
+ histval = find_symbol_value (Vminibuffer_history_variable);
+ if (EQ (histval, Qunbound))
+ Fset (Vminibuffer_history_variable, Qnil);
/* The value of the history variable must be a cons or nil. Other
values are unacceptable. We silently ignore these values. */
@@ -1959,7 +1959,28 @@
if (NILP (flag))
return Ftry_completion (string, Vbuffer_alist, predicate);
else if (EQ (flag, Qt))
- return Fall_completions (string, Vbuffer_alist, predicate, Qt);
+ {
+ Lisp_Object res = Fall_completions (string, Vbuffer_alist, predicate);
+ if (SCHARS (string) > 0)
+ return res;
+ else
+ { /* Strip out internal buffers. */
+ Lisp_Object bufs = res;
+ /* First, look for a non-internal buffer in `res'. */
+ while (CONSP (bufs) && SREF (XCAR (bufs), 0) == ' ')
+ bufs = XCDR (bufs);
+ if (NILP (bufs))
+ /* All bufs in `res' are internal, so don't trip them out. */
+ return res;
+ res = bufs;
+ while (CONSP (XCDR (bufs)))
+ if (SREF (XCAR (XCDR (bufs)), 0) == ' ')
+ XSETCDR (bufs, XCDR (XCDR (bufs)));
+ else
+ bufs = XCDR (bufs);
+ return res;
+ }
+ }
else /* assume `lambda' */
return Ftest_completion (string, Vbuffer_alist, predicate);
}
- [Emacs-diffs] Changes to emacs/src/minibuf.c,v, Juri Linkov, 2008/05/01
- [Emacs-diffs] Changes to emacs/src/minibuf.c,v, Stefan Monnier, 2008/05/05
- [Emacs-diffs] Changes to emacs/src/minibuf.c,v, Glenn Morris, 2008/05/14
- [Emacs-diffs] Changes to emacs/src/minibuf.c,v,
Stefan Monnier <=
- [Emacs-diffs] Changes to emacs/src/minibuf.c,v, Stefan Monnier, 2008/05/19
- [Emacs-diffs] Changes to emacs/src/minibuf.c,v, Stefan Monnier, 2008/05/21