From fa6d1ca87008ac2c054ad636102c3a395f43f6e7 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 28 Nov 2000 13:07:12 +0000 Subject: [PATCH] (delete-horizontal-space): Handle fields more generally. --- lisp/ChangeLog | 4 ++++ lisp/simple.el | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 966dc9dd884..03e8a380578 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2000-11-28 Miles Bader + + * simple.el (delete-horizontal-space): Handle fields more generally. + 2000-11-28 Gerd Moellmann * simple.el (delete-horizontal-space): Handle minibuffer prompt. diff --git a/lisp/simple.el b/lisp/simple.el index 13020a98a52..5331bcd52c6 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -332,9 +332,8 @@ Leave one space or none, according to the context." (defun delete-horizontal-space () "Delete all spaces and tabs around point." (interactive "*") - (skip-chars-backward " \t") - (let ((start (max (minibuffer-prompt-end) (point)))) - (delete-region start (progn (skip-chars-forward " \t") (point))))) + (skip-chars-backward " \t" (field-beginning)) + (delete-region (point) (progn (skip-chars-forward " \t") (point)))) (defun just-one-space () "Delete all spaces and tabs around point, leaving one space." -- 2.39.2