From: Richard M. Stallman Date: Mon, 20 Jun 1994 22:52:49 +0000 (+0000) Subject: (move-to-tab-stop): Get rid of spaces before tabs X-Git-Tag: emacs-19.34~7869 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f787c66bea719f1a567a2a30bbbb4b5f3f284a21;p=emacs.git (move-to-tab-stop): Get rid of spaces before tabs that were made by an immediately previous use of this command. --- 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)