Function: decipher-complete-alphabet

decipher-complete-alphabet is an interactive and byte-compiled function defined in decipher.el.gz.

Signature

(decipher-complete-alphabet)

Documentation

Complete the cipher alphabet.

This fills any blanks in the cipher alphabet with the unused letters in alphabetical order. Use this when you have a keyword cipher and you have determined the keyword.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/play/decipher.el.gz
;;--------------------------------------------------------------------
;; Miscellaneous commands:
;;--------------------------------------------------------------------

(defun decipher-complete-alphabet ()
  "Complete the cipher alphabet.
This fills any blanks in the cipher alphabet with the unused letters
in alphabetical order.  Use this when you have a keyword cipher and
you have determined the keyword."
  (interactive nil decipher-mode)
  (let ((cipher-char ?A)
        (ptr decipher-alphabet)
        buffer-read-only                ;Make buffer writable
        plain-map undo-rec)
    (while (setq plain-map (pop ptr))
      (if (equal ?\s (cdr plain-map))
          (progn
            (while (rassoc cipher-char decipher-alphabet)
              ;; Find the next unused letter
              (incf cipher-char))
            (push (cons ?\s cipher-char) undo-rec)
            (decipher-set-map cipher-char (car plain-map) t))))
    (decipher-add-undo undo-rec)))