From b90d06b07e2a7e5bc7202c49a7f6e35bab4adc10 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 1 Dec 2000 03:31:49 +0000 Subject: [PATCH] (minibuffer-contents, minibuffer-contents-no-properties) (delete-minibuffer-contents): New functions. --- lisp/simple.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 5331bcd52c6..6b7eaf3306c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -882,9 +882,23 @@ Return 0 if current buffer is not a mini-buffer." (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) -- 2.39.5