# HG changeset patch # User Miles Bader # Date 975641509 0 # Node ID e54fa77a9d6e1661949e3065e2f125cd10780abf # Parent 03fa22658c6fce482e60c313053b7ac6c63f3fb3 (minibuffer-contents, minibuffer-contents-no-properties) (delete-minibuffer-contents): New functions. diff -r 03fa22658c6f -r e54fa77a9d6e lisp/simple.el --- a/lisp/simple.el Fri Dec 01 02:59:07 2000 +0000 +++ b/lisp/simple.el Fri Dec 01 03:31:49 2000 +0000 @@ -882,9 +882,23 @@ (defun minibuffer-prompt-end () "Return the buffer position of the end of the minibuffer prompt. -Return 0 if current buffer is not a mini-buffer." +Return (point-min) if current buffer is not a mini-buffer." (field-beginning (point-max))) +(defun minibuffer-contents () + "Return the user input in a minbuffer as a string. +The current buffer must be a minibuffer." + (field-string (point-max))) + +(defun minibuffer-contents-no-properties () + "Return the user input in a minbuffer as a string, without text-properties. +The current buffer must be a minibuffer." + (field-string-no-properties (point-max))) + +(defun delete-minibuffer-contents () + "Delete all user input in a minibuffer. +The current buffer must be a minibuffer." + (delete-field (point-max))) ;Put this on C-x u, so we can force that rather than C-_ into startup msg (defalias 'advertised-undo 'undo)