aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-20 22:52:49 +0000
committerRichard M. Stallman1994-06-20 22:52:49 +0000
commitf787c66bea719f1a567a2a30bbbb4b5f3f284a21 (patch)
tree3a374f1e6c18f0c1089a3981bee257b9cba7f459
parent84d52621d7d2d2aad528005f774d44c0cac54081 (diff)
downloademacs-f787c66bea719f1a567a2a30bbbb4b5f3f284a21.tar.gz
emacs-f787c66bea719f1a567a2a30bbbb4b5f3f284a21.zip
(move-to-tab-stop): Get rid of spaces before tabs
that were made by an immediately previous use of this command.
-rw-r--r--lisp/indent.el7
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."
253 (while (and tabs (>= (current-column) (car tabs))) 253 (while (and tabs (>= (current-column) (car tabs)))
254 (setq tabs (cdr tabs))) 254 (setq tabs (cdr tabs)))
255 (if tabs 255 (if tabs
256 (move-to-column (car tabs) t)))) 256 (progn
257 (if (eq last-command 'move-to-tab-stop)
258 (let ((opoint (point)))
259 (skip-chars-backward " \t")
260 (delete-region (point) opoint)))
261 (move-to-column (car tabs) t)))))
257 262
258(define-key global-map "\t" 'indent-for-tab-command) 263(define-key global-map "\t" 'indent-for-tab-command)
259(define-key esc-map "\034" 'indent-region) 264(define-key esc-map "\034" 'indent-region)