Function: move-to-tab-stop

move-to-tab-stop is an interactive and byte-compiled function defined in indent.el.gz.

Signature

(move-to-tab-stop)

Documentation

Move point to next defined tab-stop column.

The variable tab-stop-list is a list of columns at which there are tab stops. Use M-x edit-tab-stops (edit-tab-stops) to edit them interactively.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/indent.el.gz
(defun move-to-tab-stop ()
  "Move point to next defined tab-stop column.
The variable `tab-stop-list' is a list of columns at which there are tab stops.
Use \\[edit-tab-stops] to edit them interactively."
  (interactive)
  (let ((nexttab (indent-next-tab-stop (current-column))))
    (let ((before (point)))
      (move-to-column nexttab t)
      (save-excursion
        (goto-char before)
        ;; If we just added a tab, or moved over one,
        ;; delete any superfluous spaces before the old point.
        (if (and (eq (preceding-char) ?\s)
                 (eq (following-char) ?\t))
            (let ((tabend (* (/ (current-column) tab-width) tab-width)))
              (while (and (> (current-column) tabend)
                          (eq (preceding-char) ?\s))
                (forward-char -1))
              (delete-region (point) before)))))))