403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.37
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/share/emacs/28.2/lisp/play/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/emacs/28.2/lisp/play/gametree.elc
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.



(byte-code "\300\301!\210\302\303\304\305\306\307\310\311\312\313&	\210\314\315\316\317\320DD\321\322\323%\210\314\324\316\317\325DD\326\322\323%\210\314\327\316\317\330DD\331\322\332%\210\314\333\316\317\334DD\335\322\332%\210\314\336\316\317\337DD\340\322\317%\207" [require outline custom-declare-group gametree nil "Manage game analysis trees in Emacs." :prefix "gametree-" :group games :version "20.3" custom-declare-variable gametree-half-ply-regexp funcall function #[0 "\300\207" [":"] 1 #1=""] "Matches ends of numbers of moves by the \"second\" player.\nFor instance, it is an almost universal convention in chess to postfix\nnumbers of moves by Black (if considered in isolation) by the ellipsis\n\"...\".  This is NOT a good choice for this program, though, because it\nconflicts with the use of ellipsis by Outline mode to denote collapsed\nsubtrees.  The author uses \":\" because it agrees nicely with a set of\nLaTeX macros he uses for typesetting annotated games." :type regexp gametree-full-ply-regexp #[0 "\300\207" ["\\."] 1 #1#] "Matches ends of numbers of moves by the \"first\" player.\nFor instance, it is an almost universal convention in chess to postfix\nnumbers of moves by White (if considered in isolation) by the dot \".\"." gametree-half-ply-format #[0 "\300\207" ["%d:"] 1 #1#] "Output format for move numbers of moves by the \"second\" player.\nHas to contain \"%d\" to output the actual number." string gametree-full-ply-format #[0 "\300\207" ["%d."] 1 #1#] "Output format for move numbers of moves by the \"first\" player.\nHas to contain \"%d\" to output the actual number." gametree-make-heading-function #[0 "\300\207" [#[257 "\300\301\"c\207" [make-string 42] 4 "\n\n(fn LEVEL)"]] 1 #1#] "A function of one numeric argument, LEVEL, to insert a heading at point.\nYou should change this if you change `outline-regexp'."] 10)
#@401 A list encoding the layout (i.e. the show or hide state) of the file.
If Emacs notices a local variable specification of this variable in
the first line of the buffer while saving the buffer to the visited
file, the local value will be saved there and restored the next time
the file is visited (subject to the usual restriction via
`enable-local-variables'), and the layout will be set accordingly.
(defvar gametree-local-layout nil (#$ . 1950))
(byte-code "\300\301\302\303\304DD\305\306\307%\210\300\310\302\303\311DD\312\306\307%\210\300\313\302\303\314DD\315\306\307%\210\300\316\302\303\317DD\320\306\321%\210\300\322\302\303\323DD\324\306\325%\207" [custom-declare-variable gametree-score-opener funcall function #[0 "\300\207" ["{score="] 1 #1=""] "The string which opens a score tag, and precedes the actual score." :type string gametree-score-manual-flag #[0 "\300\207" ["!"] 1 #1#] "String marking the line as manually (as opposed to automatically) scored." gametree-score-closer #[0 "\300\207" ["}"] 1 #1#] "The string which closes a score tag, and follows the actual score." gametree-score-regexp #[0 "\303\304!\305\304	!\306\304\n!\307\260\207" [gametree-score-opener gametree-score-manual-flag gametree-score-closer "[^\n
]*\\(" regexp-quote "[ 	]*\\(" "[ 	]*\\)?\\([-+]?[0-9]+\\)" "[ 	]*\\)[\n
]"] 7 #1#] "Regular expression matching lines that guide the program in scoring.\nIts third parenthetical group should match the actual score.  Its\nfirst parenthetical group should match the entire score tag.  Its\nsecond parenthetical group should be an optional flag that marks the\nline as *manually* (as opposed to automatically) scored, which\nprevents the program from recursively applying the scoring algorithm\non the subtree headed by the marked line, and makes it use the manual\nscore instead." regexp gametree-default-score #[0 "\300\207" [0] 1 #1#] "Score to assume for branches lacking score tags." integer] 6)
#@300 Insert/delete space between leading asterisks and heading text.
If the current variation is an internal node (i.e. starts with one or
more asterisks), ensure there's at least one space between the
asterisks and the text.  If on the other hand this is a leaf, there
should be no leading white space.
(defalias 'gametree-prettify-heading #[0 "\212\303\304!\210\305\306P\307\310#\203\311\312!\204#\313c\210\202#\314\212\315\307w)!\210\305\316	\317\n\320\260\307\310#\205D\311\312!\204<\313c\202D\314\212\315\307w)S!)\207" [outline-regexp gametree-full-ply-regexp gametree-half-ply-regexp beginning-of-line 1 re-search-forward "\\=" nil t looking-at "[ 	]+" " " delete-char " 	" "\\=[ 	]*[1-9][0-9]*\\(" "\\|" "\\)"] 6 (#$ . 3895)])
#@52 Read and return the number of the ply under point.
(defalias 'gametree-looking-at-ply #[0 "m\203\302\207\303\304	\305\260\306\307!\310!\203-\311\312\313\307!!_\314	\313\311!\"\203*\307\202+\302\\\207\212\315\"\210\316\317x\210\311\312`\307\225{!_T)\207" [gametree-full-ply-regexp gametree-half-ply-regexp 0 "[ 	]*\\([1-9][0-9]*\\)\\(" "\\|" "\\)" line-beginning-position 1 looking-at 2 string-to-number match-string string-match re-search-backward "0123456789" nil] 7 (#$ . 4639)])
#@67 Return the ply number of the first move of the current variation.
(defalias 'gametree-current-branch-ply #[0 "\212\301\302!\210\303\304P\305\306#\210\307 )\207" [outline-regexp beginning-of-line 1 re-search-forward "\\=" nil t gametree-looking-at-ply] 4 (#$ . 5137)])
(defalias 'gametree-forward-line #[0 "\300\301\302\303#\207" [re-search-forward "[\n
]" nil move] 4])
(byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put gametree-forward-line speed -1 put byte-optimizer byte-compile-inline-expand] 5)
#@133 Return the depth of the current variation in the analysis tree.
This value is simply the outline heading level of the current line.
(defalias 'gametree-current-branch-depth #[0 "\212\301\302!\210\303!\203\304 \202\305)\207" [outline-regexp beginning-of-line 1 looking-at outline-level 0] 2 (#$ . 5662)])
#@70 Move the current leaf variation behind all others on the same level.
(defalias 'gametree-transpose-following-leaves #[0 "\212\300\301\302\303#\210`m\204\304 \305U\203\300\301\302\303#\210\202\211`{`|\210\262)\212\306\307!\210\211c)\207" [re-search-forward "[\n
]" nil move gametree-current-branch-depth 0 beginning-of-line 1] 5 (#$ . 5977)])
(defalias 'gametree-show-children-and-entry #[0 "\300 \210\301 \207" [outline-show-children outline-show-entry] 1])
(byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put gametree-show-children-and-entry speed -1 put byte-optimizer byte-compile-inline-expand] 5)
(defalias 'gametree-entry-shown-p #[0 "\212\301y\210n\205m?\205\302!?)\207" [outline-regexp 1 looking-at] 2])
(defalias 'gametree-children-shown-p #[0 "\212\3001\301 \302\303!\210\211\301 W\2620\202\210\304)\207" [(error) gametree-current-branch-depth outline-next-visible-heading 1 nil] 3])
#@39 

(fn DEPTH &optional FROM-TOP-LEVEL)
(defalias 'gametree-current-layout #[513 "\301\302\212\3031,\211\203\203n\203\304!\204$\301\211\262\204$\305\306!\210\307 W0\202.\210\301)\203s\211\204:\305\306!\210\301\262\310 \204U\311 \203M\312C\202O\301C\244\262\202\311 \203`\313C\202b\314C\244\262\315\307 !C\244\262\210\202\207" [outline-regexp nil t (error) looking-at outline-next-visible-heading 1 gametree-current-branch-depth gametree-children-shown-p gametree-entry-shown-p show-entry gametree-show-children-and-entry show-children gametree-current-layout] 7 (#$ . 6909)])
(defalias 'gametree-save-layout #[0 "\212eb\210\301\302\303\"\211)\207" [gametree-local-layout gametree-current-layout 0 t] 3])
#@46 

(fn LAYOUT DEPTH &optional FROM-TOP-LEVEL)
(defalias 'gametree-apply-layout #[770 "\301\205p\212\3021/\211\203\203n\203\303!\204'\304\211\262\204'\305\306!\210\307 W0\2021\210\304)\205p\211\204=\305\306!\210\304\262\310 \210@\203L@ \210A@\203YA@<\204`A\262\202\311A@\307 \"\210AA\262\202\207" [outline-regexp t (error) looking-at nil outline-next-visible-heading 1 gametree-current-branch-depth outline-hide-subtree gametree-apply-layout] 7 (#$ . 7652)])
(defalias 'gametree-restore-layout #[0 "\212eb\210\301\302\303#)\207" [gametree-local-layout gametree-apply-layout 0 t] 4])
(defalias 'gametree-hack-file-layout #[0 "\212eb\210\302\303!\205\304\224b\210`\304\225|\210p\305	!))\207" [standard-output gametree-local-layout looking-at "[^\n]*-[^\n]*gametree-local-layout: \\([^;\n]*\\);" 1 princ] 2])
#@136 Return score of current variation according to its score tag.
When no score tag is present, use the value of `gametree-default-score'.
(defalias 'gametree-current-branch-score #[0 "\302!\203\f\303\304\305!!\207	\207" [gametree-score-regexp gametree-default-score looking-at string-to-number match-string 3] 3 (#$ . 8502)])
#@126 Return current internal node score computed recursively from subnodes.
Subnodes which have been manually scored are honored.
(defalias 'gametree-compute-reduced-score #[0 "\302 \303U\204\212\304\305\306\307#\210m)\204\310!\203\"\311\312!\203\"\313 \207\302 \212\304\305\306\307#\210	\314\315 \312\"\303U\203:\316\202;\317m\204V\302 \303U\203V\211\313 \"\262\304\305\306\307#\210\202;m?\205_\302 W\211\204|\320 \"\262\3211u\322\323!0\202w\210\306\262\202_\210\266\202)\207" [gametree-score-regexp gametree-default-score gametree-current-branch-depth 0 re-search-forward "[\n
]" nil move looking-at match-string 2 gametree-current-branch-score mod gametree-current-branch-ply max min gametree-compute-reduced-score (error) outline-forward-same-level 1] 7 (#$ . 8834)])
#@426 Start a new leaf variation under the current branching point.
The new variation can later be split to be a branching point itself,
with \[gametree-break-line-here].  If the point is currently on a
leaf variation, this command won't work; use \[gametree-break-line-here]
on the current line first.

With a numeric arg AT-DEPTH, first go up the tree until a node of
depth AT-DEPTH or smaller is found.

(fn &optional AT-DEPTH)
(defalias 'gametree-insert-new-leaf #[256 "\302 \303U\203\304\303!\210\211\203\302 \305!V\203\304\306!\210\202\307\306!\210\302 \310 \210\31114\312\306!0\210\202?\210db\210n\204?\313c\210\302 V\203K\314 \202R\212\315y\210\314 )`Sb\210\313c\210\316\317\320\"\303U\203g\202h	\320\245\"c\207" [gametree-full-ply-format gametree-half-ply-format gametree-current-branch-depth 0 outline-up-heading prefix-numeric-value 1 beginning-of-line outline-show-entry (error) outline-next-visible-heading "\n" gametree-current-branch-ply -1 format mod 2] 7 (#$ . 9633) "*P"])
#@533 Split the variation node at the point position.
This command works whether the current variation node is a leaf, or is
already branching at its end.  The new node is created at a level that
reflects the number of game plies between the beginning of the current
variation and the breaking point.

With a numerical argument AT-MOVE, split the variation before
White's AT-MOVEth move, or Black's if negative.  The last option will
only work of Black's moves are explicitly numbered, for instance
`1. e4 1: e5'.

(fn &optional AT-MOVE)
(defalias 'gametree-break-line-here #[256 "\211\203+\305\210`\306\305!\210\307\310\311\312\313!!!!\314V\203!\202\"	P\"\266\314\224b\210\315 \210\316 \317 \320 \211\314U\203p\212\321\305!\210\3221J\317 0\202L\210\314\211\314U\203X\320 T\202^\320 Z\\\262\262)\212\306\305!\210\n!\210\323 \210)\212\324\325\326	\327\260!\204\233\330\331\332 \333\"\314U\203\214\202\215\f\332 \333\245\"c\210\323 \210\306\305!\210b\210\334c\210\211\314U\204\260\n\317 Z\\!\210\323 )\207" [gametree-full-ply-regexp gametree-half-ply-regexp gametree-make-heading-function gametree-full-ply-format gametree-half-ply-format 1 beginning-of-line re-search-forward regexp-quote int-to-string abs prefix-numeric-value 0 gametree-transpose-following-leaves point-marker gametree-current-branch-ply gametree-current-branch-depth outline-previous-visible-heading (error) gametree-prettify-heading looking-at "[ 	]*[1-9][0-9]*\\(" "\\|" "\\)" format mod gametree-looking-at-ply 2 "\n"] 11 (#$ . 10645) "*P"])
#@117 Merges a variation with its only child.
Does *not* check if the variation has in fact a unique child; users beware.
(defalias 'gametree-merge-line #[0 "\301 \302U\203\303\302!\210\304!\203\305\224\305\225|\210\305\210\212\305y\210\301 )\306T!\210\211\302U\2059\212\307\305!\210\306\301 !\210\310 )\207" [gametree-score-regexp gametree-current-branch-depth 0 outline-up-heading looking-at 1 delete-char beginning-of-line gametree-prettify-heading] 3 (#$ . 12191) "*"])
#@301 Insert a score tag with value SCORE at the end of the current line.
If this line already has a score tag, just jump to it and alter it.
When called from a program, optional AUTO flag tells if the score is
being entered automatically (and thus should lack the manual mark).

(fn SCORE &optional AUTO)
(defalias 'gametree-insert-score #[513 "\304\305!\210\306!\2038\307\224b\210\211\203\310\311!\203\311\224\311\225|\210\203(\307\224\307\225|\210\211\204W\310\311!\204W	c\210\202W\305\210\212\312\313x)\314U\203H\315c\210\nc\210\211\204R	c\210\212c\210)??\205e\212\316\317!!c)\207" [gametree-score-regexp gametree-score-manual-flag gametree-score-opener gametree-score-closer beginning-of-line 1 looking-at 3 match-string 2 " 	" nil 0 " " int-to-string prefix-numeric-value] 5 (#$ . 12674) "*P"])
#@128 Compute current node score, maybe recursively from subnodes.  Insert it.
Subnodes which have been manually scored are honored.
(defalias 'gametree-compute-and-insert-score #[0 "\301!\205\302\303!???\304 \305\"\207" [gametree-score-regexp looking-at match-string 2 gametree-compute-reduced-score gametree-insert-score] 5 (#$ . 13494) "*"])
#@250 Store current tree layout in register REGISTER.
Use \[gametree-apply-register-layout] to restore that configuration.
Argument is a character, naming the register.

Interactively, reads the register using `register-read-with-preview'.

(fn REGISTER)
(defalias 'gametree-layout-to-register #[257 "\212eb\210\300\301\302\303\"\")\207" [set-register gametree-current-layout 0 t] 6 (#$ . 13845) (byte-code "\300\301!C\207" [register-read-with-preview "Layout to register: "] 2)])
#@175 Return to a tree layout stored in a register.
Argument is a character, naming the register.

Interactively, reads the register using `register-read-with-preview'.

(fn CHAR)
(defalias 'gametree-apply-register-layout #[257 "\212eb\210\300\301!\302\303#)\207" [gametree-apply-layout get-register 0 t] 5 (#$ . 14328) (byte-code "\300 \210\301\302!C\207" [barf-if-buffer-read-only register-read-with-preview "Apply layout from register: "] 2)])
#@325 Save the current tree layout and hack the file local variable spec.
This function saves the current layout in `gametree-local-layout' and,
if a local file variable specification for this variable exists in the
buffer, it is replaced by the new value.  See the documentation for
`gametree-local-layout' for more information.
(defalias 'gametree-save-and-hack-layout #[0 "\301 \210\302\303 \210)\304\207" [inhibit-read-only gametree-save-layout t gametree-hack-file-layout nil] 1 (#$ . 14777) nil])
(defvar gametree-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\311#\210\301\313\314#\210\301\315\316#\210\301\317\320#\210\301\321\322#\210\207" [make-sparse-keymap define-key "\n" gametree-break-line-here "" gametree-insert-new-leaf "
" gametree-merge-line " " gametree-layout-to-register "/" "j" gametree-apply-register-layout "" gametree-save-and-hack-layout ";" gametree-insert-score "^" gametree-compute-and-insert-score] 5))
(defvar gametree-mode-hook nil)
(byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [gametree-mode-hook variable-documentation put "Hook run after entering GameTree mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it.  (This is true for all hook variables.)" boundp gametree-mode-map definition-name gametree-mode] 4)
(defvar gametree-mode-map (make-sparse-keymap))
(byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\207" [gametree-mode-abbrev-table gametree-mode-map variable-documentation put purecopy "Keymap for `gametree-mode'." boundp gametree-mode-syntax-table definition-name gametree-mode (lambda (#1=#:def-tmp-var) (defvar gametree-mode-syntax-table #1#)) make-syntax-table "Syntax table for `gametree-mode'." (lambda (#1#) (defvar gametree-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `gametree-mode'." derived-mode-parent outline-mode] 5)
#@387 Major mode for managing game analysis trees.
Useful to postal and email chess (and, it is hoped, also checkers, go,
shogi, etc.) players, it is a slightly modified version of Outline mode.

\{gametree-mode-map}

In addition to any hooks its parent mode `outline-mode' might have
run, this mode runs the hook `gametree-mode-hook', as the final or
penultimate step during initialization.
(defalias 'gametree-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315!\204'\316\317 \"\210\320\f!\211\2035\211\321 =\203;\322\f\323 \"\210\210\324
\325\"\204R
!=\204R\326
\325!C#\210\327!\210\330\f!\210
!\331\332!\210\333\334\335\336\307$\210)\337\340!\207" [delay-mode-hooks major-mode mode-name gametree-mode-map gametree-mode-syntax-table gametree-mode-abbrev-table make-local-variable t outline-mode gametree-mode "GameTree" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table auto-fill-mode 0 add-hook write-contents-functions gametree-save-and-hack-layout nil run-mode-hooks gametree-mode-hook local-abbrev-table] 5 (#$ . 16964) nil])
#@14 

(fn EVENT)
(defalias 'gametree-mouse-break-line-here #[257 "\300!\210\301 \207" [mouse-set-point gametree-break-line-here] 3 (#$ . 18213) "e"])
#@14 

(fn EVENT)
(defalias 'gametree-mouse-show-children-and-entry #[257 "\300!\210\301 \210\302 \207" [mouse-set-point outline-show-children outline-show-entry] 3 (#$ . 18366) "e"])
#@14 

(fn EVENT)
(defalias 'gametree-mouse-show-subtree #[257 "\300!\210\301 \207" [mouse-set-point outline-show-subtree] 3 (#$ . 18552) "e"])
#@14 

(fn EVENT)
(defalias 'gametree-mouse-hide-subtree #[257 "\300!\210\301 \207" [mouse-set-point outline-hide-subtree] 3 (#$ . 18698) "e"])
(byte-code "\301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\312\313!\207" [gametree-mode-map define-key [M-down-mouse-2 M-mouse-2] gametree-mouse-break-line-here [S-down-mouse-1 S-mouse-1] gametree-mouse-show-children-and-entry [S-down-mouse-2 S-mouse-2] gametree-mouse-show-subtree [S-down-mouse-3 S-mouse-3] gametree-mouse-hide-subtree provide gametree] 4)

Youez - 2016 - github.com/yon3zu
LinuXploit