emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ftable 71dcbd0 12/14: Fix beginning- and end-of-table f


From: Stefan Monnier
Subject: [elpa] externals/ftable 71dcbd0 12/14: Fix beginning- and end-of-table function
Date: Mon, 2 Aug 2021 18:27:33 -0400 (EDT)

branch: externals/ftable
commit 71dcbd0593610386f60f2540b5511f7ca5adb0b4
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]