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

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

[elpa] externals/gnugo 5b49aad 316/357: [gnugo int] Use ‘line-end-posit


From: Stefan Monnier
Subject: [elpa] externals/gnugo 5b49aad 316/357: [gnugo int] Use ‘line-end-position’.
Date: Sun, 29 Nov 2020 14:51:47 -0500 (EST)

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

    [gnugo int] Use ‘line-end-position’.
    
    * packages/gnugo/gnugo.el (gnugo-propertize-board-buffer):
    ...here, to replace several instances of ‘end-of-line’ plus ‘point’.
---
 gnugo.el | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/gnugo.el b/gnugo.el
index 5b27b91..879c85e 100644
--- a/gnugo.el
+++ b/gnugo.el
@@ -652,8 +652,8 @@ when you are sure the command cannot fail."
     (put-text-property (point) (1+ (point)) 'category (gnugo-f 'tpad))
     (skip-chars-forward " ")
     (put-text-property (1- (point)) (point) 'category %gpad)
-    (put-text-property (point) (progn (end-of-line) (point)) 'category %gspc)
-    (forward-char 1)
+    (put-text-property (point) (line-end-position) 'category %gspc)
+    (forward-line 1)
     (add-text-properties (1+ (point-min)) (1- (point)) grid-props)
     (while (looking-at "\\s-*\\([0-9]+\\)[ ]")
       (let* ((row (match-string-no-properties 1))
@@ -714,13 +714,12 @@ when you are sure the command cannot fail."
                 (end (match-end 2)))
             (put-text-property beg end :gnugo-cf (cons (- end beg) prop))
             (gnugo-put prop (match-string-no-properties 2))))
-        (end-of-line)
-        (put-text-property right-empty (point) 'category %rpad)
-        (forward-char 1)))
+        (put-text-property right-empty (line-end-position) 'category %rpad)
+        (forward-line 1)))
     (add-text-properties (1- (point)) (point-max) grid-props)
     (skip-chars-forward " ")
     (put-text-property (1- (point)) (point) 'category %gpad)
-    (put-text-property (point) (progn (end-of-line) (point))
+    (put-text-property (point) (line-end-position)
                        'category %gspc)))
 
 (defun gnugo-merge-showboard-results ()



reply via email to

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