changeset 19561:7e13891b6f22

(read_minibuf): Inherit enable-multibyte-characters along with the input method, if requested.
author Richard M. Stallman <rms@gnu.org>
date Tue, 26 Aug 1997 22:16:09 +0000
parents 419378c3b93f
children 318a3a6a8ff5
files src/minibuf.c
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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).  */