Switch to recommended form of GPLv3 permissions notice.
[bpt/emacs.git] / lisp / play / decipher.el
index f314a10..5e48404 100644 (file)
@@ -1,26 +1,25 @@
 ;;; decipher.el --- cryptanalyze monoalphabetic substitution ciphers
 ;;
-;; Copyright (C) 1995, 1996, 2003, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004,
+;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 ;;
 ;; Author: Christopher J. Madsen <chris_madsen@geocities.com>
 ;; Keywords: games
 ;;
 ;; This file is part of GNU Emacs.
 ;;
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 ;;
@@ -314,7 +313,7 @@ The most useful commands are:
             (lambda () (setq buffer-read-only nil
                              buffer-undo-list nil))
             nil t)
-  (run-hooks 'decipher-mode-hook)
+  (run-mode-hooks 'decipher-mode-hook)
   (setq buffer-read-only t))
 (put 'decipher-mode 'mode-class 'special)
 
@@ -351,7 +350,7 @@ The most useful commands are:
                (t
                 (error "Bad location")))))
           (let (goal-column)
-            (previous-line 1)))
+            (forward-line -1)))
       (let ((char-a (following-char))
             (char-b (decipher-last-command-char)))
         (or (and (not (= ?w (char-syntax char-a)))
@@ -599,7 +598,7 @@ you have determined the keyword."
 (defun decipher-show-alphabet ()
   "Display the current cipher alphabet in the message line."
   (interactive)
-  (message
+  (message "%s"
    (mapconcat (lambda (a)
                 (concat
                  (char-to-string (car a))
@@ -772,7 +771,7 @@ See `decipher-loop-no-breaks' if you do not care about word divisions."
           (forward-char))
         (or (equal decipher-char ?\ )
             (progn
-              (setq decipher-char ?\ ;
+              (setq decipher-char ?\s
                     decipher--loop-prev-char ?\ )
               (funcall func)))))))
 
@@ -998,7 +997,7 @@ Creates the statistics buffer if it doesn't exist."
         major-mode       'decipher-stats-mode
         mode-name        "Decipher-Stats")
   (use-local-map decipher-stats-mode-map)
-  (run-hooks 'decipher-stats-mode-hook))
+  (run-mode-hooks 'decipher-stats-mode-hook))
 (put 'decipher-stats-mode 'mode-class 'special)
 
 ;;--------------------------------------------------------------------
@@ -1069,5 +1068,5 @@ if it can't, it signals an error."
 ;;;          (delete-backward-char 1)
 ;;;          (insert ")\n"))))))
 
-;;; arch-tag: 8f094d88-ffe1-4f99-afe3-a5e81dd939d9
+;; arch-tag: 8f094d88-ffe1-4f99-afe3-a5e81dd939d9
 ;;; decipher.el ends here