diff options
| author | Richard M. Stallman | 1995-11-14 21:05:54 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-11-14 21:05:54 +0000 |
| commit | a80a30b333db58ab32dc33e7a1ccfa148648a099 (patch) | |
| tree | 3c195101fdc39dad0f7e1f5801c2cea5aa1f2cf5 | |
| parent | 3bb3cfe75d034ccc493c226871b12716698093b2 (diff) | |
| download | emacs-a80a30b333db58ab32dc33e7a1ccfa148648a099.tar.gz emacs-a80a30b333db58ab32dc33e7a1ccfa148648a099.zip | |
(indent-line-to): Delete spaces before inserting a tab.
| -rw-r--r-- | lisp/indent.el | 3 |
1 files changed, 3 insertions, 0 deletions
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." | |||
| 82 | (back-to-indentation) | 82 | (back-to-indentation) |
| 83 | (let ((cur-col (current-column))) | 83 | (let ((cur-col (current-column))) |
| 84 | (cond ((< cur-col column) | 84 | (cond ((< cur-col column) |
| 85 | (if (> (- column (* (/ cur-col tab-width) tab-width)) tab-width) | ||
| 86 | (delete-region (point) | ||
| 87 | (progn (skip-chars-backward " ") (point)))) | ||
| 85 | (indent-to column)) | 88 | (indent-to column)) |
| 86 | ((> cur-col column) ; too far right (after tab?) | 89 | ((> cur-col column) ; too far right (after tab?) |
| 87 | (delete-region (progn (move-to-column column t) (point)) | 90 | (delete-region (progn (move-to-column column t) (point)) |