Mercurial > emacs
comparison src/minibuf.c @ 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 | a7f1c1acde93 |
children | 2f471f36f4f4 |
comparison
equal
deleted
inserted
replaced
19560:419378c3b93f | 19561:7e13891b6f22 |
---|---|
216 { | 216 { |
217 Lisp_Object val; | 217 Lisp_Object val; |
218 int count = specpdl_ptr - specpdl; | 218 int count = specpdl_ptr - specpdl; |
219 Lisp_Object mini_frame, ambient_dir, minibuffer, input_method; | 219 Lisp_Object mini_frame, ambient_dir, minibuffer, input_method; |
220 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; | 220 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
221 Lisp_Object enable_multibyte; | |
221 | 222 |
222 specbind (Qminibuffer_default, defalt); | 223 specbind (Qminibuffer_default, defalt); |
223 | 224 |
224 single_kboard_state (); | 225 single_kboard_state (); |
225 | 226 |
226 val = Qnil; | 227 val = Qnil; |
227 ambient_dir = current_buffer->directory; | 228 ambient_dir = current_buffer->directory; |
228 input_method = Qnil; | 229 input_method = Qnil; |
230 enable_multibyte = Qnil; | |
229 | 231 |
230 /* Don't need to protect PROMPT, HISTVAR, and HISTPOS because we | 232 /* Don't need to protect PROMPT, HISTVAR, and HISTPOS because we |
231 store them away before we can GC. Don't need to protect | 233 store them away before we can GC. Don't need to protect |
232 BACKUP_N because we use the value only if it is an integer. */ | 234 BACKUP_N because we use the value only if it is an integer. */ |
233 GCPRO5 (map, initial, val, ambient_dir, input_method); | 235 GCPRO5 (map, initial, val, ambient_dir, input_method); |
297 Vminibuffer_history_position = histpos; | 299 Vminibuffer_history_position = histpos; |
298 Vminibuffer_history_variable = histvar; | 300 Vminibuffer_history_variable = histvar; |
299 Vhelp_form = Vminibuffer_help_form; | 301 Vhelp_form = Vminibuffer_help_form; |
300 | 302 |
301 if (inherit_input_method) | 303 if (inherit_input_method) |
302 /* `current-input-method' is buffer local. So, remeber it in | 304 { |
303 INPUT_METHOD before changing the current buffer. */ | 305 /* `current-input-method' is buffer local. So, remeber it in |
304 input_method = Fsymbol_value (Qcurrent_input_method); | 306 INPUT_METHOD before changing the current buffer. */ |
307 input_method = Fsymbol_value (Qcurrent_input_method); | |
308 enable_multibyte = current_buffer->enable_multibyte_characters; | |
309 } | |
305 | 310 |
306 /* Switch to the minibuffer. */ | 311 /* Switch to the minibuffer. */ |
307 | 312 |
308 minibuffer = get_minibuffer (minibuf_level); | 313 minibuffer = get_minibuffer (minibuf_level); |
309 Fset_buffer (minibuffer); | 314 Fset_buffer (minibuffer); |
371 current_buffer->keymap = map; | 376 current_buffer->keymap = map; |
372 | 377 |
373 /* Turn on an input method stored in INPUT_METHOD if any. */ | 378 /* Turn on an input method stored in INPUT_METHOD if any. */ |
374 if (STRINGP (input_method) && Ffboundp (Qactivate_input_method)) | 379 if (STRINGP (input_method) && Ffboundp (Qactivate_input_method)) |
375 call1 (Qactivate_input_method, input_method); | 380 call1 (Qactivate_input_method, input_method); |
381 | |
382 /* If appropriate, copy enable-multibyte-characters into the minibuffer. */ | |
383 if (inherit_input_method) | |
384 current_buffer->enable_multibyte_characters = enable_multibyte_characters; | |
376 | 385 |
377 /* Run our hook, but not if it is empty. | 386 /* Run our hook, but not if it is empty. |
378 (run-hooks would do nothing if it is empty, | 387 (run-hooks would do nothing if it is empty, |
379 but it's important to save time here in the usual case). */ | 388 but it's important to save time here in the usual case). */ |
380 if (!NILP (Vminibuffer_setup_hook) && !EQ (Vminibuffer_setup_hook, Qunbound) | 389 if (!NILP (Vminibuffer_setup_hook) && !EQ (Vminibuffer_setup_hook, Qunbound) |