diff options
| author | Noam Postavsky | 2018-07-10 12:07:01 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2018-07-10 12:07:01 -0400 |
| commit | c249e17324ddbb1ad34b510be3ad6ebd3248ba0c (patch) | |
| tree | c749c111d6a78ab5af8e10d6d78d8dd77d91cfd5 | |
| parent | cc74539a19229ee7e70055b00e8334bd6abc0841 (diff) | |
| download | emacs-c249e17324ddbb1ad34b510be3ad6ebd3248ba0c.tar.gz emacs-c249e17324ddbb1ad34b510be3ad6ebd3248ba0c.zip | |
* lisp/indent.el (indent-line-to): Fix dedenting of tabs.
| -rw-r--r-- | lisp/indent.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/indent.el b/lisp/indent.el index db811cf35cc..450632174fc 100644 --- a/lisp/indent.el +++ b/lisp/indent.el | |||
| @@ -300,9 +300,11 @@ only if necessary. It leaves point at end of indentation." | |||
| 300 | (progn (skip-chars-backward " ") (point)))) | 300 | (progn (skip-chars-backward " ") (point)))) |
| 301 | (indent-to column)) | 301 | (indent-to column)) |
| 302 | ((> cur-col column) ; too far right (after tab?) | 302 | ((> cur-col column) ; too far right (after tab?) |
| 303 | (let ((cur-indent (point))) | 303 | (delete-region (progn (move-to-column column t) (point)) |
| 304 | (delete-region (progn (move-to-column column t) (point)) | 304 | ;; The `move-to-column' call may replace |
| 305 | cur-indent)))))) | 305 | ;; tabs with spaces, so we can't reuse the |
| 306 | ;; previous `back-to-indentation' point. | ||
| 307 | (progn (back-to-indentation) (point))))))) | ||
| 306 | 308 | ||
| 307 | (defun current-left-margin () | 309 | (defun current-left-margin () |
| 308 | "Return the left margin to use for this line. | 310 | "Return the left margin to use for this line. |