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

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

[elpa] externals/valign 5e70d9b 196/198: Fix beginning- and end-of-table


From: Stefan Monnier
Subject: [elpa] externals/valign 5e70d9b 196/198: Fix beginning- and end-of-table functions
Date: Tue, 1 Dec 2020 18:19:47 -0500 (EST)

branch: externals/valign
commit 5e70d9be8f5fd42609899dbadad45d6752eca489
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    Fix beginning- and end-of-table functions
    
    * valign.el (valign--beginning-of-table, valign--end-of-table): Don't
    move point if not at a table.
---
 valign.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/valign.el b/valign.el
index ffbe887..1d9f9bc 100644
--- a/valign.el
+++ b/valign.el
@@ -501,7 +501,8 @@ Assumes point is on a table."
   ;; This implementation allows non-table lines before a table, e.g.,
   ;; #+latex: xxx
   ;; |------+----|
-  (beginning-of-line)
+  (when (valign--at-table-p)
+    (beginning-of-line))
   (while (and (< (point-min) (point))
               (valign--at-table-p))
     (forward-line -1))
@@ -512,7 +513,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 (valign--at-table-p)
+      (beginning-of-line))
     (while (and (< (point) (point-max))
                 (valign--at-table-p))
       (forward-line 1))



reply via email to

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