diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-06-20 22:52:49 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-06-20 22:52:49 +0000 |
commit | f787c66bea719f1a567a2a30bbbb4b5f3f284a21 (patch) | |
tree | 3a374f1e6c18f0c1089a3981bee257b9cba7f459 /lisp/indent.el | |
parent | 84d52621d7d2d2aad528005f774d44c0cac54081 (diff) | |
download | emacs-f787c66bea719f1a567a2a30bbbb4b5f3f284a21.tar.gz |
(move-to-tab-stop): Get rid of spaces before tabs
that were made by an immediately previous use of this command.
Diffstat (limited to 'lisp/indent.el')
-rw-r--r-- | lisp/indent.el | 7 |
1 files changed, 6 insertions, 1 deletions
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) |