Function: decipher-resync
decipher-resync is an interactive and byte-compiled function defined
in decipher.el.gz.
Signature
(decipher-resync)
Documentation
Reprocess the buffer using the alphabet from the top.
This regenerates all deciphered plaintext and clears the undo list. You should use this if you edit the ciphertext.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/play/decipher.el.gz
(defun decipher-resync ()
"Reprocess the buffer using the alphabet from the top.
This regenerates all deciphered plaintext and clears the undo list.
You should use this if you edit the ciphertext."
(interactive nil decipher-mode)
(message "Reprocessing buffer...")
(let (alphabet
buffer-read-only ;Make buffer writable
mapping)
(save-excursion
(decipher-read-alphabet)
(setq alphabet decipher-alphabet)
(goto-char (point-min))
(and (re-search-forward "^).+" nil t)
(replace-match ")" nil nil))
(while (re-search-forward "^>.+" nil t)
(replace-match ">" nil nil))
(decipher-read-alphabet)
(while (setq mapping (pop alphabet))
(or (equal ?\s (cdr mapping))
(decipher-set-map (cdr mapping) (car mapping))))))
(setq decipher-undo-list nil
decipher-undo-list-size 0)
(message "Reprocessing buffer...done"))