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

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

[elpa] externals/gnugo 7dbf4d7 305/357: [gnugo int] Use idiomatic ‘re-s


From: Stefan Monnier
Subject: [elpa] externals/gnugo 7dbf4d7 305/357: [gnugo int] Use idiomatic ‘re-search-forward’ BOUND.
Date: Sun, 29 Nov 2020 14:51:45 -0500 (EST)

branch: externals/gnugo
commit 7dbf4d796077e6d86e1ef4f2a7165cc91d910010
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>

    [gnugo int] Use idiomatic ‘re-search-forward’ BOUND.
    
    * packages/gnugo/gnugo.el (gnugo-describe-internal-properties)
    (:gnugo-gtp-command-spec help): Specify ‘nil’ for
    for re-search-forward 2nd arg instead of ‘(point-max)’.
---
 gnugo.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnugo.el b/gnugo.el
index 71164e5..59d60df 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -414,7 +414,7 @@ Handle the big, slow-to-render, and/or uninteresting ones 
specially."
                         (if (string= "" d)
                             ".+\n"
                           ""))))
-        (while (re-search-forward rx (point-max) t)
+        (while (re-search-forward rx nil t)
           (let ((pos (get-text-property (string-to-number (match-string 1))
                                         'gnugo-position buf)))
             (delete-region (+ 2 (match-beginning 0)) (point))
@@ -2354,7 +2354,7 @@ See `gnugo-board-mode' for a full list of commands."
             (goto-char (point-min))
             (save-excursion
               (while (re-search-forward "^ *[*] \\([a-zA-Z_]+\\)\\(:.*\\)*\n"
-                                        (point-max) t)
+                                        nil t)
                 (unless pad
                   (setq pad (make-string (- (match-beginning 1)
                                             (match-beginning 0))



reply via email to

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