Function: decipher-adjacency-list

decipher-adjacency-list is an interactive and byte-compiled function defined in decipher.el.gz.

Signature

(decipher-adjacency-list CIPHER-CHAR)

Documentation

Display the adjacency list for the letter at point.

The adjacency list shows all letters which come next to CIPHER-CHAR.

An adjacency list (for the letter X) looks like this:
       1 1 1 1 1 3 2 1 3 8
X: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z * 11 14 9%
     1 1 1 2 1 1 2 5 7
This says that X comes before D once, and after B once. X begins 5 words, and ends 3 words (* represents a space). X comes before 8 different letters, after 7 different letters, and is next to a total of 11 different letters. It occurs 14 times, making up 9% of the ciphertext.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/play/decipher.el.gz
(defun decipher-adjacency-list (cipher-char)
  "Display the adjacency list for the letter at point.
The adjacency list shows all letters which come next to CIPHER-CHAR.

An adjacency list (for the letter X) looks like this:
       1 1         1     1   1       3 2 1             3   8
X: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z *  11   14   9%
     1 1                 1       2   1   1     2       5   7
This says that X comes before D once, and after B once.  X begins 5
words, and ends 3 words (`*' represents a space).  X comes before 8
different letters, after 7 different letters, and is next to a total
of 11 different letters.  It occurs 14 times, making up 9% of the
ciphertext."
  (interactive (list (upcase (following-char))) decipher-mode)
  (decipher-analyze)
  (let (start end)
    (with-current-buffer (decipher-stats-buffer)
      (goto-char (point-min))
      (or (re-search-forward (format "^%c: " cipher-char) nil t)
          (error "Character `%c' is not used in ciphertext" cipher-char))
      (forward-line -1)
      (setq start (point))
      (forward-line 3)
      (setq end (point)))
    (decipher-display-range start end)))