Commit c249e173 authored by Noam Postavsky's avatar Noam Postavsky
Browse files

* lisp/indent.el (indent-line-to): Fix dedenting of tabs.

parent cc74539a
......@@ -300,9 +300,11 @@ only if necessary. It leaves point at end of indentation."
(progn (skip-chars-backward " ") (point))))
(indent-to column))
((> cur-col column) ; too far right (after tab?)
(let ((cur-indent (point)))
(delete-region (progn (move-to-column column t) (point))
(delete-region (progn (move-to-column column t) (point))
;; The `move-to-column' call may replace
;; tabs with spaces, so we can't reuse the
;; previous `back-to-indentation' point.
(progn (back-to-indentation) (point)))))))
(defun current-left-margin ()
"Return the left margin to use for this line.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment