comparison src/minibuf.c @ 90787:91bf6e05918b

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 662-669) - Update from CVS - Fix read-only prompt problem in isearch - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 207-208) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-184
author Miles Bader <miles@gnu.org>
date Sun, 18 Mar 2007 14:11:08 +0000
parents dd7c098af727 24884385912f
children e6fdae9180d4
comparison
equal deleted inserted replaced
90786:ca12f314faac 90787:91bf6e05918b
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))
1481 || bestmatchsize != matchsize) 1481 || bestmatchsize != matchsize)
1482 /* Don't count the same string multiple times. */ 1482 /* Don't count the same string multiple times. */
1483 matchcount++; 1483 matchcount++;
1484 bestmatchsize = matchsize; 1484 bestmatchsize = matchsize;
1485 if (matchsize <= SCHARS (string) 1485 if (matchsize <= SCHARS (string)
1486 /* If completion-ignore-case is non-nil, don't
1487 short-circuit because we want to find the best
1488 possible match *including* case differences. */
1489 && !completion_ignore_case
1486 && matchcount > 1) 1490 && matchcount > 1)
1487 /* No need to look any further. */ 1491 /* No need to look any further. */
1488 break; 1492 break;
1489 } 1493 }
1490 } 1494 }