(indent-rigidly--pop-undo)
(let* ((current (indent-rigidly--current-indentation beg end))
(rtl (eq (current-bidi-paragraph-direction) 'right-to-left))
- (next (indent--next-tab-stop current (if rtl nil 'prev))))
+ (next (indent-next-tab-stop current (if rtl nil 'prev))))
(indent-rigidly beg end (- next current))))
(defun indent-rigidly-right-to-tab-stop (beg end)
(indent-rigidly--pop-undo)
(let* ((current (indent-rigidly--current-indentation beg end))
(rtl (eq (current-bidi-paragraph-direction) 'right-to-left))
- (next (indent--next-tab-stop current (if rtl 'prev))))
+ (next (indent-next-tab-stop current (if rtl 'prev))))
(indent-rigidly beg end (- next current))))
(defun indent-line-to (column)
(setq tab-stop-list tabs))
(message "Tab stops installed"))
-(defun indent--next-tab-stop (column &optional prev)
+(defun indent-next-tab-stop (column &optional prev)
"Return the next tab stop after COLUMN.
If PREV is non-nil, return the previous one instead."
(let ((tabs tab-stop-list))
(if (<= column last) -1 (/ (- column last 1) step))
(1+ (/ (- column last) step)))))))))
+(defun indent-accumulate-tab-stops (limit)
+ "Get a list of tab stops before LIMIT (inclusive)."
+ (let ((tab 0) (tab-stops))
+ (while (<= (setq tab (indent-next-tab-stop tab)) limit)
+ (push tab tab-stops))
+ (nreverse tab-stops)))
+
(defun tab-to-tab-stop ()
"Insert spaces or tabs to next defined tab-stop column.
The variable `tab-stop-list' is a list of columns at which there are tab stops.
(interactive)
(and abbrev-mode (= (char-syntax (preceding-char)) ?w)
(expand-abbrev))
- (let ((nexttab (indent--next-tab-stop (current-column))))
+ (let ((nexttab (indent-next-tab-stop (current-column))))
(delete-horizontal-space t)
(indent-to nexttab)))
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 ((nexttab (indent-next-tab-stop (current-column))))
(let ((before (point)))
(move-to-column nexttab t)
(save-excursion