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

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

[elpa] 01/01: [gnugo int] Use ‘follo wing-char’ instead of ‘char-after’.


From: Thien-Thi Nguyen
Subject: [elpa] 01/01: [gnugo int] Use ‘follo wing-char’ instead of ‘char-after’.
Date: Fri, 14 Mar 2014 08:52:15 +0000

ttn pushed a commit to branch master
in repository elpa.

commit bfb5f9a62d558243c022365a740b9fe33ae1bbce
Author: Thien-Thi Nguyen <address@hidden>
Date:   Fri Mar 14 09:54:59 2014 +0100

    [gnugo int] Use ‘following-char’ instead of ‘char-after’.
    
    * packages/gnugo/gnugo.el (gnugo-animate-group
    (gnugo-magic-undo, gnugo/sgf-read-file): ...here.
---
 packages/gnugo/gnugo.el |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 39531e9..a1da4de 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -1112,7 +1112,7 @@ To start a game try M-x gnugo."
   (let* ((pos (gnugo-position))
          (orig-b-m-p (buffer-modified-p))
          blurb stones)
-    (unless (memq (char-after) '(?X ?O))
+    (unless (memq (following-char) '(?X ?O))
       (user-error "No stone at %s" pos))
     (setq blurb (message "Computing %s stones ..." w/d)
           stones (gnugo-lsquery "%s_stones %s" w/d pos))
@@ -1120,7 +1120,7 @@ To start a game try M-x gnugo."
     (setplist (gnugo-f 'anim) nil)
     (let* ((spec (if (gnugo-get :display-using-images)
                      (loop with yin  = (get-text-property (point) 'gnugo-yin)
-                           with yang = (gnugo-yang (char-after))
+                           with yang = (gnugo-yang (following-char))
                            with up   = (get (gnugo-yy yin yang t) 'display)
                            with dn   = (get (gnugo-yy yin yang) 'display)
                            for n below (length gnugo-animation-string)
@@ -1378,12 +1378,12 @@ turn to play.  Optional second arg NOALT non-nil 
inhibits this."
            (let ((pos (upcase spec)))
              (setq done `(lambda ()
                            (gnugo-goto-pos ,pos)
-                           (memq (char-after) '(?. ?+))))
+                           (memq (following-char) '(?. ?+))))
              (when (funcall done)
                (user-error "%s already clear" pos))
              (when (= (save-excursion
                         (gnugo-goto-pos pos)
-                        (char-after))
+                        (following-char))
                       (if (string= "black" user-color)
                           ?O
                         ?X))
@@ -2076,7 +2076,7 @@ starting a new one.  See `gnugo-board-mode' documentation 
for more info."
                                 (t (lambda (char) (or (= ?\: char)
                                                       (= ?\] char))))))
                         c)
-                    (while (not (funcall endp (setq c (char-after))))
+                    (while (not (funcall endp (setq c (following-char))))
                       (cond ((= ?\\ c)
                              (delete-char 1)
                              (if (eolp)
@@ -2103,7 +2103,7 @@ starting a new one.  See `gnugo-board-mode' documentation 
for more info."
                             (one (aref spec 0) :end))
                            ((eq 'or (car spec))
                             (let ((v (one (cadr spec) t)))
-                              (if (= ?\] (char-after))
+                              (if (= ?\] (following-char))
                                   v
                                 (forward-char 1)
                                 ;; todo: this assumes `spec' has the form
@@ -2117,7 +2117,7 @@ starting a new one.  See `gnugo-board-mode' documentation 
for more info."
                                     (one (cdr spec) :end)))))
          (short (who) (when (eobp)
                         (error "Unexpected EOF while reading %s" who)))
-         (atvalp () (= ?\[ (char-after)))
+         (atvalp () (= ?\[ (following-char)))
          (PROP () (let (name spec ltype)
                     (sw) (short 'property)
                     (when (looking-at "[A-Z]")
@@ -2143,7 +2143,7 @@ starting a new one.  See `gnugo-board-mode' documentation 
for more info."
                                     (forward-char -1)
                                     (nreverse ls))))
                          (forward-char 1))))))
-         (seek (c) (and (sw) (not (eobp)) (= c (char-after))))
+         (seek (c) (and (sw) (not (eobp)) (= c (following-char))))
          (seek-into (c) (when (seek c)
                           (forward-char 1)
                           t))



reply via email to

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