summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Liu <sdl.web@gmail.com>2014-06-24 07:09:20 +0800
committerLeo Liu <sdl.web@gmail.com>2014-06-24 07:09:20 +0800
commit96559792e1c45918fcb147a01772d02556b26d00 (patch)
treeb2a71c9bb35bac83dea5597408fd752d83902c9e
parent027676cc19d67b70b734526486011dcff8ee2e78 (diff)
downloademacs-96559792e1c45918fcb147a01772d02556b26d00.tar.gz
* align.el (align-adjust-col-for-rule): Unbreak due to defaulting
tab-stop-list to nil. * indent.el (indent-next-tab-stop): Rename from indent--next-tab-stop. (indent-rigidly-left-to-tab-stop) (indent-rigidly-right-to-tab-stop, tab-to-tab-stop) (move-to-tab-stop): Change callers. Fixes: debbugs:16381
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/align.el9
-rw-r--r--lisp/indent.el10
3 files changed, 17 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 471b4494011..38dbdfbd8f1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
+2014-06-23 Leo Liu <sdl.web@gmail.com>
+
+ * align.el (align-adjust-col-for-rule): Unbreak due to defaulting
+ tab-stop-list to nil. (Bug#16381)
+
+ * indent.el (indent-next-tab-stop): Rename from indent--next-tab-stop.
+ (indent-rigidly-left-to-tab-stop)
+ (indent-rigidly-right-to-tab-stop, tab-to-tab-stop)
+ (move-to-tab-stop): Change callers.
+
2014-06-22 Eli Zaretskii <eliz@gnu.org>
* skeleton.el (skeleton-insert): Yet another fix of the doc string
diff --git a/lisp/align.el b/lisp/align.el
index 3b54aba264f..0e6b84d11ec 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -1130,13 +1130,8 @@ TAB-STOP specifies whether SPACING refers to tab-stop boundaries."
column
(if (not tab-stop)
(+ column spacing)
- (let ((stops tab-stop-list))
- (while stops
- (if (and (> (car stops) column)
- (= (setq spacing (1- spacing)) 0))
- (setq column (car stops)
- stops nil)
- (setq stops (cdr stops)))))
+ (dotimes (_ spacing)
+ (setq column (indent-next-tab-stop column)))
column)))
(defsubst align-column (pos)
diff --git a/lisp/indent.el b/lisp/indent.el
index ab38d502966..7df927ff808 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -249,7 +249,7 @@ indentation by specifying a large negative ARG."
(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)
@@ -258,7 +258,7 @@ indentation by specifying a large negative ARG."
(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)
@@ -654,7 +654,7 @@ You can add or remove colons and then do \\<edit-tab-stops-map>\\[edit-tab-stops
(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))
@@ -684,7 +684,7 @@ Use \\[edit-tab-stops] to edit them interactively."
(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)))
@@ -693,7 +693,7 @@ Use \\[edit-tab-stops] to edit them interactively."
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