• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/play/

Lines Matching defs:score

73 ;;  As of version 1.1, a simple score reducer has been implemented.
74 ;; As you type in leaf variations, you can add a numerical score tag
77 ;; reduced score of the internal variation based on the scores of its
142 (defcustom gametree-score-opener "{score="
143 "*The string which opens a score tag, and precedes the actual score."
147 (defcustom gametree-score-manual-flag "!"
152 (defcustom gametree-score-closer "}"
153 "*The string which closes a score tag, and follows the actual score."
157 (defcustom gametree-score-regexp
159 (regexp-quote gametree-score-opener)
161 (regexp-quote gametree-score-manual-flag)
163 (regexp-quote gametree-score-closer)
166 Its third parenthetical group should match the actual score. Its
167 first parenthetical group should match the entire score tag. Its
172 score instead."
176 (defcustom gametree-default-score 0
177 "*Score to assume for branches lacking score tags."
348 (defun gametree-current-branch-score ()
349 "Return score of current variation according to its score tag.
350 When no score tag is present, use the value of `gametree-default-score'."
351 (if (looking-at gametree-score-regexp)
353 gametree-default-score))
355 (defun gametree-compute-reduced-score ()
356 "Return current internal node score computed recursively from subnodes.
361 (and (looking-at gametree-score-regexp)
363 (gametree-current-branch-score)
370 (let ((running gametree-default-score)
377 (gametree-current-branch-score)))
383 (gametree-compute-reduced-score)))
497 (if (looking-at gametree-score-regexp)
509 (defun gametree-insert-score (score &optional auto)
510 "Insert a score tag with value SCORE at the end of the current line.
511 If this line already has a score tag, just jump to it and alter it.
512 When called from a program, optional AUTO flag tells if the score is
516 (if (looking-at gametree-score-regexp)
521 (if (not (null score))
524 (insert gametree-score-manual-flag)))
528 (insert gametree-score-opener)
529 (if (not auto) (insert gametree-score-manual-flag))
530 (save-excursion (insert gametree-score-closer)))
531 (if (not (null score))
533 (insert (int-to-string (prefix-numeric-value score))))))
535 (defun gametree-compute-and-insert-score ()
536 "Compute current node score, maybe recursively from subnodes. Insert it.
539 (let ((auto (not (and (looking-at gametree-score-regexp)
541 (score (gametree-compute-reduced-score)))
542 (gametree-insert-score score auto)))
594 (define-key gametree-mode-map "\C-c;" 'gametree-insert-score)
595 (define-key gametree-mode-map "\C-c^" 'gametree-compute-and-insert-score)