Function: gametree-looking-at-ply
gametree-looking-at-ply is a byte-compiled function defined in
gametree.el.gz.
Signature
(gametree-looking-at-ply)
Documentation
Read and return the number of the ply under point.
Source Code
;; Defined in /usr/src/emacs/lisp/play/gametree.el.gz
(defun gametree-looking-at-ply ()
"Read and return the number of the ply under point."
(if (eobp) 0
(let ((boundary (concat "[ \t]*\\([1-9][0-9]*\\)\\("
gametree-full-ply-regexp "\\|"
gametree-half-ply-regexp "\\)"))
(limit (line-beginning-position 1)))
(if (looking-at boundary)
(+ (* 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-number
(buffer-substring (point) (match-end 1))))))))))