Function: decipher-restore-checkpoint
decipher-restore-checkpoint is an interactive and byte-compiled
function defined in decipher.el.gz.
Signature
(decipher-restore-checkpoint)
Documentation
Restore the cipher alphabet from a checkpoint.
If point is not on a checkpoint line, moves to the first checkpoint line. If point is on a checkpoint, restores that checkpoint.
Type M-x decipher-make-checkpoint (decipher-make-checkpoint) to make a checkpoint.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/play/decipher.el.gz
(defun decipher-restore-checkpoint ()
"Restore the cipher alphabet from a checkpoint.
If point is not on a checkpoint line, moves to the first checkpoint line.
If point is on a checkpoint, restores that checkpoint.
Type \\[decipher-make-checkpoint] to make a checkpoint."
(interactive nil decipher-mode)
(beginning-of-line)
(if (looking-at "%!\\([A-Z ]+\\)!")
;; Restore this checkpoint:
(let ((alphabet (match-string 1))
buffer-read-only) ;Make buffer writable
(goto-char (point-min))
(re-search-forward "^)")
(or (eolp)
(delete-region (point) (progn (end-of-line) (point))))
(insert alphabet)
(decipher-resync))
;; Move to the first checkpoint:
(goto-char (point-min))
(if (re-search-forward "^%![A-Z ]+!" nil t)
(message "Select the checkpoint to restore and type %s"
(substitute-command-keys "\\[decipher-restore-checkpoint]"))
(error "No checkpoints in this buffer"))))