# HG changeset patch # User Richard M. Stallman # Date 872633769 0 # Node ID 7e13891b6f228339c231a184267714bb667bfe8f # Parent 419378c3b93fef3b1dd9c77104fccf83450ff282 (read_minibuf): Inherit enable-multibyte-characters along with the input method, if requested. diff -r 419378c3b93f -r 7e13891b6f22 src/minibuf.c --- a/src/minibuf.c Tue Aug 26 22:11:25 1997 +0000 +++ b/src/minibuf.c Tue Aug 26 22:16:09 1997 +0000 @@ -218,6 +218,7 @@ int count = specpdl_ptr - specpdl; Lisp_Object mini_frame, ambient_dir, minibuffer, input_method; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; + Lisp_Object enable_multibyte; specbind (Qminibuffer_default, defalt); @@ -226,6 +227,7 @@ val = Qnil; ambient_dir = current_buffer->directory; input_method = Qnil; + enable_multibyte = Qnil; /* Don't need to protect PROMPT, HISTVAR, and HISTPOS because we store them away before we can GC. Don't need to protect @@ -299,9 +301,12 @@ Vhelp_form = Vminibuffer_help_form; if (inherit_input_method) - /* `current-input-method' is buffer local. So, remeber it in - INPUT_METHOD before changing the current buffer. */ - input_method = Fsymbol_value (Qcurrent_input_method); + { + /* `current-input-method' is buffer local. So, remeber it in + INPUT_METHOD before changing the current buffer. */ + input_method = Fsymbol_value (Qcurrent_input_method); + enable_multibyte = current_buffer->enable_multibyte_characters; + } /* Switch to the minibuffer. */ @@ -374,6 +379,10 @@ if (STRINGP (input_method) && Ffboundp (Qactivate_input_method)) call1 (Qactivate_input_method, input_method); + /* If appropriate, copy enable-multibyte-characters into the minibuffer. */ + if (inherit_input_method) + current_buffer->enable_multibyte_characters = enable_multibyte_characters; + /* Run our hook, but not if it is empty. (run-hooks would do nothing if it is empty, but it's important to save time here in the usual case). */