branch: externals/ftable commit 71dcbd0593610386f60f2540b5511f7ca5adb0b4 Author: Yuan Fu <caso...@gmail.com> Commit: Yuan Fu <caso...@gmail.com>
Fix beginning- and end-of-table function * ftable.el (ftable--beginning-of-table, ftable--end-of-table): Don't move point if not at a table. --- ftable.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ftable.el b/ftable.el index 27178dc..4def264 100644 --- a/ftable.el +++ b/ftable.el @@ -595,7 +595,8 @@ Assumes point is on a table." ;; This implementation allows non-table lines before a table, e.g., ;; #+latex: xxx ;; |------+----| - (beginning-of-line) + (when (ftable--at-table-p) + (beginning-of-line)) (while (and (< (point-min) (point)) (ftable--at-table-p)) (forward-line -1)) @@ -606,7 +607,8 @@ Assumes point is on a table." "Go forward to the end of the table at point. Assumes point is on a table." (let ((start (point))) - (beginning-of-line) + (when (ftable--at-table-p) + (beginning-of-line)) (while (and (< (point) (point-max)) (ftable--at-table-p)) (forward-line 1))