Mercurial > emacs
comparison src/minibuf.c @ 76369:488516b0de0a
(read_minibuf): Bind inhibit-read-only a bit longer so as
to handle correctly prompts with read-only property.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 07 Mar 2007 02:13:26 +0000 |
parents | c76aa2fa987a |
children | 24884385912f |
comparison
equal
deleted
inserted
replaced
76368:33f4741e3f74 | 76369:488516b0de0a |
---|---|
698 { | 698 { |
699 int count1 = SPECPDL_INDEX (); | 699 int count1 = SPECPDL_INDEX (); |
700 specbind (Qinhibit_read_only, Qt); | 700 specbind (Qinhibit_read_only, Qt); |
701 specbind (Qinhibit_modification_hooks, Qt); | 701 specbind (Qinhibit_modification_hooks, Qt); |
702 Ferase_buffer (); | 702 Ferase_buffer (); |
703 | |
704 if (!NILP (current_buffer->enable_multibyte_characters) | |
705 && ! STRING_MULTIBYTE (minibuf_prompt)) | |
706 minibuf_prompt = Fstring_make_multibyte (minibuf_prompt); | |
707 | |
708 /* Insert the prompt, record where it ends. */ | |
709 Finsert (1, &minibuf_prompt); | |
710 if (PT > BEG) | |
711 { | |
712 Fput_text_property (make_number (BEG), make_number (PT), | |
713 Qfront_sticky, Qt, Qnil); | |
714 Fput_text_property (make_number (BEG), make_number (PT), | |
715 Qrear_nonsticky, Qt, Qnil); | |
716 Fput_text_property (make_number (BEG), make_number (PT), | |
717 Qfield, Qt, Qnil); | |
718 Fadd_text_properties (make_number (BEG), make_number (PT), | |
719 Vminibuffer_prompt_properties, Qnil); | |
720 } | |
703 unbind_to (count1, Qnil); | 721 unbind_to (count1, Qnil); |
704 } | 722 } |
705 | |
706 if (!NILP (current_buffer->enable_multibyte_characters) | |
707 && ! STRING_MULTIBYTE (minibuf_prompt)) | |
708 minibuf_prompt = Fstring_make_multibyte (minibuf_prompt); | |
709 | |
710 /* Insert the prompt, record where it ends. */ | |
711 Finsert (1, &minibuf_prompt); | |
712 if (PT > BEG) | |
713 { | |
714 Fput_text_property (make_number (BEG), make_number (PT), | |
715 Qfront_sticky, Qt, Qnil); | |
716 Fput_text_property (make_number (BEG), make_number (PT), | |
717 Qrear_nonsticky, Qt, Qnil); | |
718 Fput_text_property (make_number (BEG), make_number (PT), | |
719 Qfield, Qt, Qnil); | |
720 Fadd_text_properties (make_number (BEG), make_number (PT), | |
721 Vminibuffer_prompt_properties, Qnil); | |
722 } | |
723 | 723 |
724 minibuf_prompt_width = (int) current_column (); /* iftc */ | 724 minibuf_prompt_width = (int) current_column (); /* iftc */ |
725 | 725 |
726 /* Put in the initial input. */ | 726 /* Put in the initial input. */ |
727 if (!NILP (initial)) | 727 if (!NILP (initial)) |