Function: decipher-get-undo
decipher-get-undo is a byte-compiled function defined in
decipher.el.gz.
Signature
(decipher-get-undo CIPHER-CHAR PLAIN-CHAR)
Source Code
;; Defined in /usr/src/emacs/lisp/play/decipher.el.gz
(defun decipher-get-undo (cipher-char plain-char)
;; Return an undo record that will undo the result of
;; (decipher-set-map CIPHER-CHAR PLAIN-CHAR)
;; We must copy the cons cell because the original cons cells will be
;; modified using setcdr.
(let ((cipher-map (decipher-copy-cons (rassoc cipher-char decipher-alphabet)))
(plain-map (decipher-copy-cons (assoc plain-char decipher-alphabet))))
(cond ((equal ?\s plain-char)
cipher-map)
((equal cipher-char (cdr plain-map))
nil) ;We aren't changing anything
((equal ?\s (cdr plain-map))
(or cipher-map (cons ?\s cipher-char)))
(cipher-map
(list plain-map cipher-map))
(t
plain-map))))