Mercurial > emacs
diff lisp/play/gametree.el @ 88155:d7ddb3e565de
sync with trunk
author | Henrik Enberg <henrik.enberg@telia.com> |
---|---|
date | Mon, 16 Jan 2006 00:03:54 +0000 |
parents | 0d8b17d428b5 |
children |
line wrap: on
line diff
--- a/lisp/play/gametree.el Sun Jan 15 23:02:10 2006 +0000 +++ b/lisp/play/gametree.el Mon Jan 16 00:03:54 2006 +0000 @@ -1,6 +1,7 @@ ;;; gametree.el --- manage game analysis trees in Emacs -;; Copyright (C) 1997 Free Software Foundation, Inc +;; Copyright (C) 1997, 1999, 2002, 2003, 2004, +;; 2005 Free Software Foundation, Inc. ;; Author: Ian T Zimmerman <itz@rahul.net> ;; Created: Wed Dec 10 07:41:46 PST 1997 @@ -20,8 +21,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -204,12 +205,12 @@ gametree-half-ply-regexp "\\)")) (limit (save-excursion (beginning-of-line 1) (point)))) (if (looking-at boundary) - (+ (* 2 (string-to-int (match-string 1))) + (+ (* 2 (string-to-number (match-string 1))) (if (string-match gametree-half-ply-regexp (match-string 2)) 1 0)) (save-excursion (re-search-backward boundary limit) (skip-chars-backward "0123456789") - (1+ (* 2 (string-to-int + (1+ (* 2 (string-to-number (buffer-substring (point) (match-end 1)))))))))) (defun gametree-current-branch-ply () @@ -345,7 +346,7 @@ "Return score of current variation according to its score tag. When no score tag is present, use the value of `gametree-default-score'." (if (looking-at gametree-score-regexp) - (string-to-int (match-string 3)) + (string-to-number (match-string 3)) gametree-default-score)) (defun gametree-compute-reduced-score () @@ -573,9 +574,9 @@ shogi, etc.) players, it is a slightly modified version of Outline mode. \\{gametree-mode-map}" -(auto-fill-mode 0) -(make-variable-buffer-local 'write-contents-hooks) -(add-hook 'write-contents-hooks 'gametree-save-and-hack-layout)) + (auto-fill-mode 0) + (make-local-variable 'write-contents-hooks) + (add-hook 'write-contents-hooks 'gametree-save-and-hack-layout)) ;;;; Key bindings @@ -618,4 +619,5 @@ (provide 'gametree) +;;; arch-tag: aaa30943-9ae4-4cc1-813d-a46f96b7e4f1 ;;; gametree.el ends here