aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-11-28 11:54:12 +0000
committerGerd Moellmann2000-11-28 11:54:12 +0000
commitdfe8ece3726a0ee4b9a8a977fd527eb666e6e9c0 (patch)
tree6ddb543719580451648d3f86809f28d53bd9da1c
parent7cb668991105849ed4561b102d8550ff7f519583 (diff)
downloademacs-dfe8ece3726a0ee4b9a8a977fd527eb666e6e9c0.tar.gz
emacs-dfe8ece3726a0ee4b9a8a977fd527eb666e6e9c0.zip
(delete-horizontal-space): Handle minibuffer prompt.
-rw-r--r--lisp/simple.el3
1 files changed, 2 insertions, 1 deletions
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."
333 "Delete all spaces and tabs around point." 333 "Delete all spaces and tabs around point."
334 (interactive "*") 334 (interactive "*")
335 (skip-chars-backward " \t") 335 (skip-chars-backward " \t")
336 (delete-region (point) (progn (skip-chars-forward " \t") (point)))) 336 (let ((start (max (minibuffer-prompt-end) (point))))
337 (delete-region start (progn (skip-chars-forward " \t") (point)))))
337 338
338(defun just-one-space () 339(defun just-one-space ()
339 "Delete all spaces and tabs around point, leaving one space." 340 "Delete all spaces and tabs around point, leaving one space."