comparison src/minibuf.c @ 83562:5a45becb5728

Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-702 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-703 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-704 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-705 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-706 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-707 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-216 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-602
author Karoly Lorentey <karoly@lorentey.hu>
date Sun, 22 Apr 2007 12:45:07 +0000
parents 738ce3540ffb 58d40e42dfe4
children cc587bfd19ca
comparison
equal deleted inserted replaced
83561:dc002877ce12 83562:5a45becb5728
385 } 385 }
386 386
387 DEFUN ("minibuffer-contents", Fminibuffer_contents, 387 DEFUN ("minibuffer-contents", Fminibuffer_contents,
388 Sminibuffer_contents, 0, 0, 0, 388 Sminibuffer_contents, 0, 0, 0,
389 doc: /* Return the user input in a minibuffer as a string. 389 doc: /* Return the user input in a minibuffer as a string.
390 The current buffer must be a minibuffer. */) 390 If the current buffer is not a minibuffer, return its entire contents. */)
391 () 391 ()
392 { 392 {
393 int prompt_end = XINT (Fminibuffer_prompt_end ()); 393 int prompt_end = XINT (Fminibuffer_prompt_end ());
394 return make_buffer_string (prompt_end, ZV, 1); 394 return make_buffer_string (prompt_end, ZV, 1);
395 } 395 }
396 396
397 DEFUN ("minibuffer-contents-no-properties", Fminibuffer_contents_no_properties, 397 DEFUN ("minibuffer-contents-no-properties", Fminibuffer_contents_no_properties,
398 Sminibuffer_contents_no_properties, 0, 0, 0, 398 Sminibuffer_contents_no_properties, 0, 0, 0,
399 doc: /* Return the user input in a minibuffer as a string, without text-properties. 399 doc: /* Return the user input in a minibuffer as a string, without text-properties.
400 The current buffer must be a minibuffer. */) 400 If the current buffer is not a minibuffer, return its entire contents. */)
401 () 401 ()
402 { 402 {
403 int prompt_end = XINT (Fminibuffer_prompt_end ()); 403 int prompt_end = XINT (Fminibuffer_prompt_end ());
404 return make_buffer_string (prompt_end, ZV, 0); 404 return make_buffer_string (prompt_end, ZV, 0);
405 } 405 }
406 406
407 DEFUN ("minibuffer-completion-contents", Fminibuffer_completion_contents, 407 DEFUN ("minibuffer-completion-contents", Fminibuffer_completion_contents,
408 Sminibuffer_completion_contents, 0, 0, 0, 408 Sminibuffer_completion_contents, 0, 0, 0,
409 doc: /* Return the user input in a minibuffer before point as a string. 409 doc: /* Return the user input in a minibuffer before point as a string.
410 That is what completion commands operate on. 410 That is what completion commands operate on.
411 The current buffer must be a minibuffer. */) 411 If the current buffer is not a minibuffer, return its entire contents. */)
412 () 412 ()
413 { 413 {
414 int prompt_end = XINT (Fminibuffer_prompt_end ()); 414 int prompt_end = XINT (Fminibuffer_prompt_end ());
415 if (PT < prompt_end) 415 if (PT < prompt_end)
416 error ("Cannot do completion in the prompt"); 416 error ("Cannot do completion in the prompt");
418 } 418 }
419 419
420 DEFUN ("delete-minibuffer-contents", Fdelete_minibuffer_contents, 420 DEFUN ("delete-minibuffer-contents", Fdelete_minibuffer_contents,
421 Sdelete_minibuffer_contents, 0, 0, 0, 421 Sdelete_minibuffer_contents, 0, 0, 0,
422 doc: /* Delete all user input in a minibuffer. 422 doc: /* Delete all user input in a minibuffer.
423 The current buffer must be a minibuffer. */) 423 If the current buffer is not a minibuffer, erase its entire contents. */)
424 () 424 ()
425 { 425 {
426 int prompt_end = XINT (Fminibuffer_prompt_end ()); 426 int prompt_end = XINT (Fminibuffer_prompt_end ());
427 if (prompt_end < ZV) 427 if (prompt_end < ZV)
428 del_range (prompt_end, ZV); 428 del_range (prompt_end, ZV);
704 Ferase_buffer (); 704 Ferase_buffer ();
705 705
706 if (!NILP (current_buffer->enable_multibyte_characters) 706 if (!NILP (current_buffer->enable_multibyte_characters)
707 && ! STRING_MULTIBYTE (minibuf_prompt)) 707 && ! STRING_MULTIBYTE (minibuf_prompt))
708 minibuf_prompt = Fstring_make_multibyte (minibuf_prompt); 708 minibuf_prompt = Fstring_make_multibyte (minibuf_prompt);
709 709
710 /* Insert the prompt, record where it ends. */ 710 /* Insert the prompt, record where it ends. */
711 Finsert (1, &minibuf_prompt); 711 Finsert (1, &minibuf_prompt);
712 if (PT > BEG) 712 if (PT > BEG)
713 { 713 {
714 Fput_text_property (make_number (BEG), make_number (PT), 714 Fput_text_property (make_number (BEG), make_number (PT),