From 8c9f211fd5a666aa3fb28931b00a6f0edb6902f7 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 29 Oct 2008 21:30:44 +0000 Subject: [PATCH] (delete-minibuffer-contents): Delete all minibuffer contents instead of just the current field. --- lisp/minibuffer.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 7626b5d1352..eb78bba80fc 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -300,7 +300,9 @@ That is what completion commands operate on." (defun delete-minibuffer-contents () "Delete all user input in a minibuffer. If the current buffer is not a minibuffer, erase its entire contents." - (delete-field)) + ;; We used to do `delete-field' here, but when file name shadowing + ;; is on, the field doesn't cover the entire minibuffer contents. + (delete-region (minibuffer-prompt-end) (point-max))) (defcustom completion-auto-help t "Non-nil means automatically provide help for invalid completion input. -- 2.39.5