]> git.eshelyaron.com Git - emacs.git/commitdiff
(move-to-tab-stop): Get rid of spaces before tabs
authorRichard M. Stallman <rms@gnu.org>
Mon, 20 Jun 1994 22:52:49 +0000 (22:52 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 20 Jun 1994 22:52:49 +0000 (22:52 +0000)
that were made by an immediately previous use of this command.

lisp/indent.el

index 17e58241fd1619f64a8d648f7f5e4dc47244463b..2713be3b51f9b0c194961f4431d3b00c54464491 100644 (file)
@@ -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)