summaryrefslogtreecommitdiff
path: root/lisp/play
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2009-08-21 07:40:24 +0000
committerGlenn Morris <rgm@gnu.org>2009-08-21 07:40:24 +0000
commit9b4c5ecd6a04221f17e46d35eed24004a58b2ee2 (patch)
tree3728e92eb7a3dba271fd78c8b1c0bc56d4222c27 /lisp/play
parentce86eeb58ee1e43093b4be663e47143efea97872 (diff)
downloademacs-9b4c5ecd6a04221f17e46d35eed24004a58b2ee2.tar.gz
Use forward-line, not goto-line.
Diffstat (limited to 'lisp/play')
-rw-r--r--lisp/play/5x5.el3
-rw-r--r--lisp/play/decipher.el3
-rw-r--r--lisp/play/gomoku.el3
-rw-r--r--lisp/play/landmark.el3
-rw-r--r--lisp/play/mpuz.el9
5 files changed, 14 insertions, 7 deletions
diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el
index d81c4f324d8..f04bc94b113 100644
--- a/lisp/play/5x5.el
+++ b/lisp/play/5x5.el
@@ -300,7 +300,8 @@ Quit current game \\[5x5-quit-game]"
(defun 5x5-position-cursor ()
"Position the cursor on the grid."
- (goto-line (+ (* 5x5-y-pos 5x5-y-scale) 2))
+ (goto-char (point-min))
+ (forward-line (1+ (* 5x5-y-pos 5x5-y-scale)))
(goto-char (+ (point) (* 5x5-x-pos 5x5-x-scale) (+ 5x5-x-pos 1) 1)))
(defun 5x5-made-move ()
diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el
index 48fe74bc12d..e3dcef93a91 100644
--- a/lisp/play/decipher.el
+++ b/lisp/play/decipher.el
@@ -274,7 +274,8 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ -*-decipher-*-\n)\n\n")
(insert ">\n"))))) ;Mark plaintext line
(delete-blank-lines) ;Remove any blank lines
(delete-blank-lines)) ; at end of buffer
- (goto-line 4)
+ (goto-char (point-min))
+ (forward-line 3)
(decipher-mode))
;;;###autoload
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el
index 7cb23eb16dd..f0cdea13474 100644
--- a/lisp/play/gomoku.el
+++ b/lisp/play/gomoku.el
@@ -989,7 +989,8 @@ If the game is finished, this command requests for another game."
(defun gomoku-goto-xy (x y)
"Move point to square at X, Y coords."
(let ((inhibit-point-motion-hooks t))
- (goto-line (+ 1 gomoku-y-offset (* gomoku-square-height (1- y)))))
+ (goto-char (point-min))
+ (forward-line (+ gomoku-y-offset (* gomoku-square-height (1- y)))))
(move-to-column (+ gomoku-x-offset (* gomoku-square-width (1- x)))))
(defun gomoku-plot-square (square value)
diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el
index 482e32f6ef0..95840d81900 100644
--- a/lisp/play/landmark.el
+++ b/lisp/play/landmark.el
@@ -876,7 +876,8 @@ If the game is finished, this command requests for another game."
(defun lm-goto-xy (x y)
"Move point to square at X, Y coords."
(let ((inhibit-point-motion-hooks t))
- (goto-line (+ 1 lm-y-offset (* lm-square-height (1- y)))))
+ (goto-char (point-min))
+ (forward-line (+ lm-y-offset (* lm-square-height (1- y)))))
(move-to-column (+ lm-x-offset (* lm-square-width (1- x)))))
(defun lm-plot-square (square value)
diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el
index 5725bc1d825..7e8222d7e1d 100644
--- a/lisp/play/mpuz.el
+++ b/lisp/play/mpuz.el
@@ -320,12 +320,14 @@ You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
(defun mpuz-paint-errors ()
"Paint error count on the puzzle screen."
(mpuz-switch-to-window)
- (goto-line 3)
+ (goto-char (point-min))
+ (forward-line 2)
(mpuz-paint-number (prin1-to-string mpuz-nb-errors)))
(defun mpuz-paint-statistics ()
"Paint statistics about previous games on the puzzle screen."
- (goto-line 7)
+ (goto-char (point-min))
+ (forward-line 6)
(mpuz-paint-number (prin1-to-string mpuz-nb-completed-games))
(mpuz-paint-number
(format "%.2f"
@@ -352,7 +354,8 @@ You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
('mpuz-unsolved))))
buffer-read-only)
(mapc (lambda (square)
- (goto-line (car square)) ; line before column!
+ (goto-char (point-min))
+ (forward-line (1- (car square))) ; line before column!
(move-to-column (cdr square))
(insert char)
(set-text-properties (1- (point)) (point) face)