;;; decipher.el --- cryptanalyze monoalphabetic substitution ciphers
;;
-;; Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1996, 2003, 2005 Free Software Foundation, Inc.
;;
;; Author: Christopher J. Madsen <chris_madsen@geocities.com>
;; Keywords: games
(defcustom decipher-force-uppercase t
"*Non-nil means to convert ciphertext to uppercase.
-Nil means the case of the ciphertext is preserved.
+nil means the case of the ciphertext is preserved.
This variable must be set before typing `\\[decipher]'."
:type 'boolean
:group 'decipher)
(defcustom decipher-ignore-spaces nil
"*Non-nil means to ignore spaces and punctuation when counting digrams.
-You should set this to `nil' if the cipher message is divided into words,
-or `t' if it is not.
+You should set this to nil if the cipher message is divided into words,
+or t if it is not.
This variable is buffer-local."
:type 'boolean
:group 'decipher)
(define-key decipher-mode-map "R" 'decipher-restore-checkpoint)
(define-key decipher-mode-map "U" 'decipher-undo)
(define-key decipher-mode-map " " 'decipher-keypress)
- (substitute-key-definition 'undo 'decipher-undo
- decipher-mode-map global-map)
- (substitute-key-definition 'advertised-undo 'decipher-undo
- decipher-mode-map global-map)
+ (define-key decipher-mode-map [remap undo] 'decipher-undo)
+ (define-key decipher-mode-map [remap advertised-undo] 'decipher-undo)
(let ((key ?a))
(while (<= key ?z)
(define-key decipher-mode-map (vector key) 'decipher-keypress)
(setq case-fold-search nil)) ;Case is significant when searching
(use-local-map decipher-mode-map)
(set-syntax-table decipher-mode-syntax-table)
- (decipher-read-alphabet)
+ (unless (= (point-min) (point-max))
+ (decipher-read-alphabet))
(set (make-local-variable 'font-lock-defaults)
'(decipher-font-lock-keywords t))
;; Make the buffer writable when we exit Decipher mode:
;;; (delete-backward-char 1)
;;; (insert ")\n"))))))
+;;; arch-tag: 8f094d88-ffe1-4f99-afe3-a5e81dd939d9
;;; decipher.el ends here