branch: externals/ftable commit a647832418e4a36392f27157fbccc1ade1f8525f Author: Yuan Fu <caso...@gmail.com> Commit: Yuan Fu <caso...@gmail.com>
xx --- ftable.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ftable.el b/ftable.el index 6c33b9f..57c0beb 100644 --- a/ftable.el +++ b/ftable.el @@ -550,12 +550,14 @@ position of the table, not including any newlines. TABLEP is t if point is on a table, nil if not. CHARSET is the box drawing charset used by the table (if there is a table). \(See `ftable-box-charset-alist'.)" - (let* ((beg (save-excursion (search-backward "\n\n" nil t) + (let* ((beg (save-excursion (if (not (search-backward "\n\n" nil t)) + (point-min)) (skip-chars-forward "\n") (point))) - (end (save-excursion (search-forward "\n\n" nil t) - (skip-chars-backward "\n") - (point))) + (end (save-excursion (if (not (search-forward "\n\n" nil t)) + (point-max) + (skip-chars-backward "\n") + (point)))) (text (buffer-substring-no-properties beg end))) (append (list text beg end)