[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnugo 6573d16 065/357: [gnugo int] Add abstraction: gnu
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnugo 6573d16 065/357: [gnugo int] Add abstraction: gnugo--compare-strings |
Date: |
Sun, 29 Nov 2020 14:50:49 -0500 (EST) |
branch: externals/gnugo
commit 6573d1670b86ea5c8ab9f0b591b4bb08d57094d9
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[gnugo int] Add abstraction: gnugo--compare-strings
* packages/gnugo/gungo.el (gnugo--compare-strings): New defsubst.
(gnugo--q, gnugo-merge-showboard-results): Use it.
---
gnugo.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/gnugo.el b/gnugo.el
index 917579c..578fc81 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -173,6 +173,9 @@ For ~t, the value is a snapshot, use `gnugo-refresh' to
update it.")
;;;---------------------------------------------------------------------------
;;; Support functions
+(defsubst gnugo--compare-strings (s1 beg1 s2 beg2)
+ (compare-strings s1 beg1 nil s2 beg2 nil))
+
(defun gnugo-put (key value)
"Associate move/game/board-specific property KEY with VALUE.
@@ -343,11 +346,10 @@ status of the command. See also `gnugo-query'."
(let ((full (concat (process-get proc :srs)
string)))
(process-put proc :srs full)
- (unless (numberp (compare-strings
+ (unless (numberp (gnugo--compare-strings
full (max 0 (- (length full)
2))
- nil
- "\n\n" nil nil))
+ "\n\n" nil))
(process-put proc :incomplete nil))))
(if (null args)
fmt
@@ -563,8 +565,9 @@ when you are sure the command cannot fail."
(bef-start 0) (bef-idx 0)
(aft-start 0) (aft-idx 0)
aft-sync-backtrack mis inc cut new very-strange)
- (while (numberp (setq mis (compare-strings bef bef-start nil
- aft aft-start nil)))
+ (while (numberp (setq mis (gnugo--compare-strings
+ bef bef-start
+ aft aft-start)))
(setq aft-sync-backtrack nil
inc (if (cl-minusp mis)
(- (+ 1 mis))
- [elpa] externals/gnugo b8b8763 037/357: [gnugo maint] Update "next" in HACKING; nfc., (continued)
- [elpa] externals/gnugo b8b8763 037/357: [gnugo maint] Update "next" in HACKING; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo a4b96a1 024/357: [gnugo int] Use ‘number-sequence’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 402bf68 039/357: [gnugo] Don't show underscore in group-animation message., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7647c9c 062/357: [gnugo int] Avoid redundant calls to ‘gnugo-get’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo fef1847 040/357: [gnugo] Use special constructs for keybindings in docstrings., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 5c8f31d 043/357: [gnugo maint] Update HACKING; nfc., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 2d4c9ad 046/357: [gnugo] New command: ‘_’ and ‘M-_’ (gnugo-boss-is-near), Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 02c55b7 054/357: [gnugo] Release: 2.3.1, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo c479509 044/357: [gnugo] Bind ‘DEL’ to ‘gnugo-undo-two-moves’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 9748703 060/357: [gnugo int] Elide single-use local var., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 6573d16 065/357: [gnugo int] Add abstraction: gnugo--compare-strings,
Stefan Monnier <=
- [elpa] externals/gnugo a949e26 071/357: [gnugo int] Rename arg from SWITCH to ME-NEXT., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 558d778 072/357: [gnugo] Fix bug: Handle property value type ‘none’ normally., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 9469952 075/357: fixup! [gnugo sgf] Move gratuitous newline from after to before (sub)trees., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 4f96ca6 076/357: [gnugo sgf int] Add abstractions: seek, seek-into, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 98414ca 086/357: [gnugo int] Add abstractions: gnugo{--root-node, /sgf-root-node}, Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 622b1eb 084/357: [gnugo] Handle ‘(gnugo-move-history 'two)’., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 06586e9 093/357: [gnugo] Fix bug: Don't bother translating move "resign"., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 7f380e4 006/357: [gnugo] Presume working time-date.el., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo 74b839a 066/357: [gnugo int] Use ‘incf’ more., Stefan Monnier, 2020/11/29
- [elpa] externals/gnugo ad774f4 074/357: [gnugo sgf] Move gratuitous newline from after to before (sub)trees., Stefan Monnier, 2020/11/29