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

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

[nongnu] elpa/gnuplot 7f29578 023/184: Minor improvements to movement-by


From: ELPA Syncer
Subject: [nongnu] elpa/gnuplot 7f29578 023/184: Minor improvements to movement-by-command functions
Date: Sun, 29 Aug 2021 11:03:08 -0400 (EDT)

branch: elpa/gnuplot
commit 7f295784100d89e858c6a760c6a902a409e31555
Author: Jonathan Oddie <j.j.oddie@gmail.com>
Commit: Jonathan Oddie <j.j.oddie@gmail.com>

    Minor improvements to movement-by-command functions
---
 gnuplot.el | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/gnuplot.el b/gnuplot.el
index d7d6a1d..186aa94 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -2374,21 +2374,22 @@ If there are no continuation lines, returns 
point-at-eol."
 (defun gnuplot-beginning-of-command ()
   "Move point to beginning of command containing point."
   (let ((limit (gnuplot-point-at-beginning-of-continuation)))
-    (search-backward ";" limit 'lim)
     (while
-       (gnuplot-in-string-or-comment)
-      (search-backward ";" limit 'lim)))
-  (skip-chars-forward ";")
-  (skip-syntax-forward "-"))
+       (and
+        (search-backward ";" limit 'lim)
+        (gnuplot-in-string-or-comment)))
+    (skip-chars-forward ";")
+    (skip-syntax-forward "-")))
 
 (defun gnuplot-end-of-command ()
   "Move point to end of command containing point."
   (let ((limit (gnuplot-point-at-end-of-continuation)))
-    (search-forward ";" limit 'lim)
     (while
-       (gnuplot-in-string-or-comment)
-      (search-forward ";" limit 'lim)))
-  (backward-char))
+       (and
+        (search-forward ";" limit 'lim)
+        (gnuplot-in-string-or-comment)))
+    (skip-chars-backward ";")
+    (skip-syntax-backward "-")))
 
 (defun gnuplot-point-at-beginning-of-command ()
   "Return position at the beginning of command containing point."



reply via email to

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