]> git.eshelyaron.com Git - emacs.git/commitdiff
(delete-minibuffer-contents): Delete all minibuffer contents instead
authorChong Yidong <cyd@stupidchicken.com>
Wed, 29 Oct 2008 21:30:44 +0000 (21:30 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Wed, 29 Oct 2008 21:30:44 +0000 (21:30 +0000)
of just the current field.

lisp/minibuffer.el

index 7626b5d13524ee9be49d82d20698465cffeb08e5..eb78bba80fcbd58ee8243a1db84dc242c8f3b95a 100644 (file)
@@ -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.