Function: type-break-demo-hanoi

type-break-demo-hanoi is a byte-compiled function defined in type-break.el.gz.

Signature

(type-break-demo-hanoi)

Documentation

Take a hanoiing typing break.

Source Code

;; Defined in /usr/src/emacs/lisp/type-break.el.gz
;; This is a wrapper around hanoi that calls it with an arg large enough to
;; make the largest discs possible that will fit in the window.
;; Also, clean up the *Hanoi* buffer after we're done.
(defun type-break-demo-hanoi ()
  "Take a hanoiing typing break."
  (and (get-buffer "*Hanoi*")
       (kill-buffer "*Hanoi*"))
  (condition-case ()
      (progn
        (hanoi (/ (window-width) 8))
        ;; Wait for user to come back.
        (read-event)
	(type-break-catch-up-event)
        (kill-buffer "*Hanoi*"))
    (quit
     (read-event)
     (type-break-catch-up-event)
     (and (get-buffer "*Hanoi*")
          (kill-buffer "*Hanoi*")))))