diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-06-19 13:05:41 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-06-19 13:05:41 -0400 |
commit | ec6de1e2eee67a7d5f14e1187b4edd28548e8639 (patch) | |
tree | 4df49bacc3eed5ad085a3001a7ab9a19316d3a1e /src/minibuf.c | |
parent | 28be1ada0fb9a4b51cf361dc45208e764bd34143 (diff) | |
download | emacs-ec6de1e2eee67a7d5f14e1187b4edd28548e8639.tar.gz |
* src/minibuf.c (Fread_string): Bind minibuffer-completion-table.
Diffstat (limited to 'src/minibuf.c')
-rw-r--r-- | src/minibuf.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index d0e503486fd..b0f4e3db6c1 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1035,12 +1035,20 @@ Fifth arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits (Lisp_Object prompt, Lisp_Object initial_input, Lisp_Object history, Lisp_Object default_value, Lisp_Object inherit_input_method) { Lisp_Object val; + ptrdiff_t count = SPECPDL_INDEX (); + + /* Just in case we're in a recursive minibuffer, make it clear that the + previous minibuffer's completion table does not apply to the new + minibuffer. + FIXME: `minibuffer-completion-table' should be buffer-local instead. */ + specbind (Qminibuffer_completion_table, Qnil); + val = Fread_from_minibuffer (prompt, initial_input, Qnil, Qnil, history, default_value, inherit_input_method); if (STRINGP (val) && SCHARS (val) == 0 && ! NILP (default_value)) val = CONSP (default_value) ? XCAR (default_value) : default_value; - return val; + return unbind_to (count, val); } DEFUN ("read-no-blanks-input", Fread_no_blanks_input, Sread_no_blanks_input, 1, 3, 0, |