aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Liu2014-06-24 07:09:20 +0800
committerLeo Liu2014-06-24 07:09:20 +0800
commit96559792e1c45918fcb147a01772d02556b26d00 (patch)
treeb2a71c9bb35bac83dea5597408fd752d83902c9e
parent027676cc19d67b70b734526486011dcff8ee2e78 (diff)
downloademacs-96559792e1c45918fcb147a01772d02556b26d00.tar.gz
emacs-96559792e1c45918fcb147a01772d02556b26d00.zip
* 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 @@
12014-06-23 Leo Liu <sdl.web@gmail.com>
2
3 * align.el (align-adjust-col-for-rule): Unbreak due to defaulting
4 tab-stop-list to nil. (Bug#16381)
5
6 * indent.el (indent-next-tab-stop): Rename from indent--next-tab-stop.
7 (indent-rigidly-left-to-tab-stop)
8 (indent-rigidly-right-to-tab-stop, tab-to-tab-stop)
9 (move-to-tab-stop): Change callers.
10
12014-06-22 Eli Zaretskii <eliz@gnu.org> 112014-06-22 Eli Zaretskii <eliz@gnu.org>
2 12
3 * skeleton.el (skeleton-insert): Yet another fix of the doc string 13 * 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."
1130 column 1130 column
1131 (if (not tab-stop) 1131 (if (not tab-stop)
1132 (+ column spacing) 1132 (+ column spacing)
1133 (let ((stops tab-stop-list)) 1133 (dotimes (_ spacing)
1134 (while stops 1134 (setq column (indent-next-tab-stop column)))
1135 (if (and (> (car stops) column)
1136 (= (setq spacing (1- spacing)) 0))
1137 (setq column (car stops)
1138 stops nil)
1139 (setq stops (cdr stops)))))
1140 column))) 1135 column)))
1141 1136
1142(defsubst align-column (pos) 1137(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."
249 (indent-rigidly--pop-undo) 249 (indent-rigidly--pop-undo)
250 (let* ((current (indent-rigidly--current-indentation beg end)) 250 (let* ((current (indent-rigidly--current-indentation beg end))
251 (rtl (eq (current-bidi-paragraph-direction) 'right-to-left)) 251 (rtl (eq (current-bidi-paragraph-direction) 'right-to-left))
252 (next (indent--next-tab-stop current (if rtl nil 'prev)))) 252 (next (indent-next-tab-stop current (if rtl nil 'prev))))
253 (indent-rigidly beg end (- next current)))) 253 (indent-rigidly beg end (- next current))))
254 254
255(defun indent-rigidly-right-to-tab-stop (beg end) 255(defun indent-rigidly-right-to-tab-stop (beg end)
@@ -258,7 +258,7 @@ indentation by specifying a large negative ARG."
258 (indent-rigidly--pop-undo) 258 (indent-rigidly--pop-undo)
259 (let* ((current (indent-rigidly--current-indentation beg end)) 259 (let* ((current (indent-rigidly--current-indentation beg end))
260 (rtl (eq (current-bidi-paragraph-direction) 'right-to-left)) 260 (rtl (eq (current-bidi-paragraph-direction) 'right-to-left))
261 (next (indent--next-tab-stop current (if rtl 'prev)))) 261 (next (indent-next-tab-stop current (if rtl 'prev))))
262 (indent-rigidly beg end (- next current)))) 262 (indent-rigidly beg end (- next current))))
263 263
264(defun indent-line-to (column) 264(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
654 (setq tab-stop-list tabs)) 654 (setq tab-stop-list tabs))
655 (message "Tab stops installed")) 655 (message "Tab stops installed"))
656 656
657(defun indent--next-tab-stop (column &optional prev) 657(defun indent-next-tab-stop (column &optional prev)
658 "Return the next tab stop after COLUMN. 658 "Return the next tab stop after COLUMN.
659If PREV is non-nil, return the previous one instead." 659If PREV is non-nil, return the previous one instead."
660 (let ((tabs tab-stop-list)) 660 (let ((tabs tab-stop-list))
@@ -684,7 +684,7 @@ Use \\[edit-tab-stops] to edit them interactively."
684 (interactive) 684 (interactive)
685 (and abbrev-mode (= (char-syntax (preceding-char)) ?w) 685 (and abbrev-mode (= (char-syntax (preceding-char)) ?w)
686 (expand-abbrev)) 686 (expand-abbrev))
687 (let ((nexttab (indent--next-tab-stop (current-column)))) 687 (let ((nexttab (indent-next-tab-stop (current-column))))
688 (delete-horizontal-space t) 688 (delete-horizontal-space t)
689 (indent-to nexttab))) 689 (indent-to nexttab)))
690 690
@@ -693,7 +693,7 @@ Use \\[edit-tab-stops] to edit them interactively."
693The variable `tab-stop-list' is a list of columns at which there are tab stops. 693The variable `tab-stop-list' is a list of columns at which there are tab stops.
694Use \\[edit-tab-stops] to edit them interactively." 694Use \\[edit-tab-stops] to edit them interactively."
695 (interactive) 695 (interactive)
696 (let ((nexttab (indent--next-tab-stop (current-column)))) 696 (let ((nexttab (indent-next-tab-stop (current-column))))
697 (let ((before (point))) 697 (let ((before (point)))
698 (move-to-column nexttab t) 698 (move-to-column nexttab t)
699 (save-excursion 699 (save-excursion