comparison src/minibuf.c @ 90813:e6fdae9180d4

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 698-710) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 216) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-196
author Miles Bader <miles@gnu.org>
date Tue, 24 Apr 2007 21:56:25 +0000
parents 91bf6e05918b 58d40e42dfe4
children e9f94688a064
comparison
equal deleted inserted replaced
90812:6137cc8ddf90 90813:e6fdae9180d4
384 } 384 }
385 385
386 DEFUN ("minibuffer-contents", Fminibuffer_contents, 386 DEFUN ("minibuffer-contents", Fminibuffer_contents,
387 Sminibuffer_contents, 0, 0, 0, 387 Sminibuffer_contents, 0, 0, 0,
388 doc: /* Return the user input in a minibuffer as a string. 388 doc: /* Return the user input in a minibuffer as a string.
389 The current buffer must be a minibuffer. */) 389 If the current buffer is not a minibuffer, return its entire contents. */)
390 () 390 ()
391 { 391 {
392 int prompt_end = XINT (Fminibuffer_prompt_end ()); 392 int prompt_end = XINT (Fminibuffer_prompt_end ());
393 return make_buffer_string (prompt_end, ZV, 1); 393 return make_buffer_string (prompt_end, ZV, 1);
394 } 394 }
395 395
396 DEFUN ("minibuffer-contents-no-properties", Fminibuffer_contents_no_properties, 396 DEFUN ("minibuffer-contents-no-properties", Fminibuffer_contents_no_properties,
397 Sminibuffer_contents_no_properties, 0, 0, 0, 397 Sminibuffer_contents_no_properties, 0, 0, 0,
398 doc: /* Return the user input in a minibuffer as a string, without text-properties. 398 doc: /* Return the user input in a minibuffer as a string, without text-properties.
399 The current buffer must be a minibuffer. */) 399 If the current buffer is not a minibuffer, return its entire contents. */)
400 () 400 ()
401 { 401 {
402 int prompt_end = XINT (Fminibuffer_prompt_end ()); 402 int prompt_end = XINT (Fminibuffer_prompt_end ());
403 return make_buffer_string (prompt_end, ZV, 0); 403 return make_buffer_string (prompt_end, ZV, 0);
404 } 404 }
405 405
406 DEFUN ("minibuffer-completion-contents", Fminibuffer_completion_contents, 406 DEFUN ("minibuffer-completion-contents", Fminibuffer_completion_contents,
407 Sminibuffer_completion_contents, 0, 0, 0, 407 Sminibuffer_completion_contents, 0, 0, 0,
408 doc: /* Return the user input in a minibuffer before point as a string. 408 doc: /* Return the user input in a minibuffer before point as a string.
409 That is what completion commands operate on. 409 That is what completion commands operate on.
410 The current buffer must be a minibuffer. */) 410 If the current buffer is not a minibuffer, return its entire contents. */)
411 () 411 ()
412 { 412 {
413 int prompt_end = XINT (Fminibuffer_prompt_end ()); 413 int prompt_end = XINT (Fminibuffer_prompt_end ());
414 if (PT < prompt_end) 414 if (PT < prompt_end)
415 error ("Cannot do completion in the prompt"); 415 error ("Cannot do completion in the prompt");
417 } 417 }
418 418
419 DEFUN ("delete-minibuffer-contents", Fdelete_minibuffer_contents, 419 DEFUN ("delete-minibuffer-contents", Fdelete_minibuffer_contents,
420 Sdelete_minibuffer_contents, 0, 0, 0, 420 Sdelete_minibuffer_contents, 0, 0, 0,
421 doc: /* Delete all user input in a minibuffer. 421 doc: /* Delete all user input in a minibuffer.
422 The current buffer must be a minibuffer. */) 422 If the current buffer is not a minibuffer, erase its entire contents. */)
423 () 423 ()
424 { 424 {
425 int prompt_end = XINT (Fminibuffer_prompt_end ()); 425 int prompt_end = XINT (Fminibuffer_prompt_end ());
426 if (prompt_end < ZV) 426 if (prompt_end < ZV)
427 del_range (prompt_end, ZV); 427 del_range (prompt_end, ZV);
702 Ferase_buffer (); 702 Ferase_buffer ();
703 703
704 if (!NILP (current_buffer->enable_multibyte_characters) 704 if (!NILP (current_buffer->enable_multibyte_characters)
705 && ! STRING_MULTIBYTE (minibuf_prompt)) 705 && ! STRING_MULTIBYTE (minibuf_prompt))
706 minibuf_prompt = Fstring_make_multibyte (minibuf_prompt); 706 minibuf_prompt = Fstring_make_multibyte (minibuf_prompt);
707 707
708 /* Insert the prompt, record where it ends. */ 708 /* Insert the prompt, record where it ends. */
709 Finsert (1, &minibuf_prompt); 709 Finsert (1, &minibuf_prompt);
710 if (PT > BEG) 710 if (PT > BEG)
711 { 711 {
712 Fput_text_property (make_number (BEG), make_number (PT), 712 Fput_text_property (make_number (BEG), make_number (PT),