From dfe8ece3726a0ee4b9a8a977fd527eb666e6e9c0 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 28 Nov 2000 11:54:12 +0000 Subject: [PATCH] (delete-horizontal-space): Handle minibuffer prompt. --- lisp/simple.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 0e70e83a157..13020a98a52 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -333,7 +333,8 @@ Leave one space or none, according to the context." "Delete all spaces and tabs around point." (interactive "*") (skip-chars-backward " \t") - (delete-region (point) (progn (skip-chars-forward " \t") (point)))) + (let ((start (max (minibuffer-prompt-end) (point)))) + (delete-region start (progn (skip-chars-forward " \t") (point))))) (defun just-one-space () "Delete all spaces and tabs around point, leaving one space." -- 2.39.5