Function: gametree-merge-line
gametree-merge-line is an interactive and byte-compiled function
defined in gametree.el.gz.
Signature
(gametree-merge-line)
Documentation
Merges a variation with its only child.
Does *not* check if the variation has in fact a unique child; users beware.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/play/gametree.el.gz
(defun gametree-merge-line ()
"Merges a variation with its only child.
Does *not* check if the variation has in fact a unique child; users beware."
(interactive "*")
(if (zerop (gametree-current-branch-depth))
(outline-up-heading 0))
(if (looking-at gametree-score-regexp)
(delete-region (match-beginning 1) (match-end 1)))
(end-of-line 1)
(let ((prev-depth (save-excursion (forward-line 1)
(gametree-current-branch-depth))))
(delete-char (1+ prev-depth))
(if (zerop prev-depth)
(save-excursion
(beginning-of-line 1)
(delete-char (gametree-current-branch-depth))
(gametree-prettify-heading)))))