From: Richard M. Stallman Date: Tue, 14 Nov 1995 21:05:54 +0000 (+0000) Subject: (indent-line-to): Delete spaces before inserting a tab. X-Git-Tag: emacs-19.34~2315 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a80a30b333db58ab32dc33e7a1ccfa148648a099;p=emacs.git (indent-line-to): Delete spaces before inserting a tab. --- diff --git a/lisp/indent.el b/lisp/indent.el index 47ef23d4aa3..19786237d6d 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -82,6 +82,9 @@ only if necessary. It leaves point at end of indentation." (back-to-indentation) (let ((cur-col (current-column))) (cond ((< cur-col column) + (if (> (- column (* (/ cur-col tab-width) tab-width)) tab-width) + (delete-region (point) + (progn (skip-chars-backward " ") (point)))) (indent-to column)) ((> cur-col column) ; too far right (after tab?) (delete-region (progn (move-to-column column t) (point))