From f787c66bea719f1a567a2a30bbbb4b5f3f284a21 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 20 Jun 1994 22:52:49 +0000 Subject: [PATCH] (move-to-tab-stop): Get rid of spaces before tabs that were made by an immediately previous use of this command. --- lisp/indent.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/indent.el b/lisp/indent.el index 17e58241fd1..2713be3b51f 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -253,7 +253,12 @@ Use \\[edit-tab-stops] to edit them interactively." (while (and tabs (>= (current-column) (car tabs))) (setq tabs (cdr tabs))) (if tabs - (move-to-column (car tabs) t)))) + (progn + (if (eq last-command 'move-to-tab-stop) + (let ((opoint (point))) + (skip-chars-backward " \t") + (delete-region (point) opoint))) + (move-to-column (car tabs) t))))) (define-key global-map "\t" 'indent-for-tab-command) (define-key esc-map "\034" 'indent-region) -- 2.39.5