diff options
| author | Miles Bader | 2000-12-01 03:31:49 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-12-01 03:31:49 +0000 |
| commit | b90d06b07e2a7e5bc7202c49a7f6e35bab4adc10 (patch) | |
| tree | 764e77642dfab7633eff38e8fa3e087d3fa39eae | |
| parent | d5b1993e019e5d59af44803f82649ebd9d2b795d (diff) | |
| download | emacs-b90d06b07e2a7e5bc7202c49a7f6e35bab4adc10.tar.gz emacs-b90d06b07e2a7e5bc7202c49a7f6e35bab4adc10.zip | |
(minibuffer-contents, minibuffer-contents-no-properties)
(delete-minibuffer-contents): New functions.
| -rw-r--r-- | lisp/simple.el | 16 |
1 files changed, 15 insertions, 1 deletions
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." | |||
| 882 | 882 | ||
| 883 | (defun minibuffer-prompt-end () | 883 | (defun minibuffer-prompt-end () |
| 884 | "Return the buffer position of the end of the minibuffer prompt. | 884 | "Return the buffer position of the end of the minibuffer prompt. |
| 885 | Return 0 if current buffer is not a mini-buffer." | 885 | Return (point-min) if current buffer is not a mini-buffer." |
| 886 | (field-beginning (point-max))) | 886 | (field-beginning (point-max))) |
| 887 | 887 | ||
| 888 | (defun minibuffer-contents () | ||
| 889 | "Return the user input in a minbuffer as a string. | ||
| 890 | The current buffer must be a minibuffer." | ||
| 891 | (field-string (point-max))) | ||
| 892 | |||
| 893 | (defun minibuffer-contents-no-properties () | ||
| 894 | "Return the user input in a minbuffer as a string, without text-properties. | ||
| 895 | The current buffer must be a minibuffer." | ||
| 896 | (field-string-no-properties (point-max))) | ||
| 897 | |||
| 898 | (defun delete-minibuffer-contents () | ||
| 899 | "Delete all user input in a minibuffer. | ||
| 900 | The current buffer must be a minibuffer." | ||
| 901 | (delete-field (point-max))) | ||
| 888 | 902 | ||
| 889 | ;Put this on C-x u, so we can force that rather than C-_ into startup msg | 903 | ;Put this on C-x u, so we can force that rather than C-_ into startup msg |
| 890 | (defalias 'advertised-undo 'undo) | 904 | (defalias 'advertised-undo 'undo) |