Function: decipher-alphabet-keypress

decipher-alphabet-keypress is a byte-compiled function defined in decipher.el.gz.

Signature

(decipher-alphabet-keypress A B)

Source Code

;; Defined in /usr/src/emacs/lisp/play/decipher.el.gz
(defun decipher-alphabet-keypress (a b)
  ;; Handle keypresses in the alphabet lines.
  ;; A is the character in the alphabet row (which starts with '(')
  ;; B is the character pressed
  (cond ((and (>= a ?A) (<= a ?Z))
         ;; If A is uppercase, then it is in the ciphertext alphabet:
         (decipher-set-map a b))
        ((and (>= a ?a) (<= a ?z))
         ;; If A is lowercase, then it is in the plaintext alphabet:
         (if (= b ?\s)
             ;; We are clearing the association (if any):
             (if (/= ?\s (setq b (cdr (assoc a decipher-alphabet))))
                 (decipher-set-map b ?\s))
           ;; Associate the plaintext char with the char pressed:
           (decipher-set-map b a)))
        (t
         ;; If A is not a letter, that's a problem:
         (error "Bad character"))))