]> code.delx.au - gnu-emacs/blobdiff - lisp/play/dunnet.el
(completion-setup-function):
[gnu-emacs] / lisp / play / dunnet.el
index 9e7dddc92e2238f853ba4da4d2e43deb5457a455..43b8ce4f3ce2496046b0cfd2abad722c44c7e135 100644 (file)
@@ -1,7 +1,7 @@
-;;; dunnet.el --- text adventure for Emacs
+;;; dunnet.el --- text adventure for Emacs -*-  byte-compile-warnings: nil -*-
 
 ;; Copyright (C) 1992, 1993, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 ;; Author: Ron Schnell <ronnie@driver-aces.com>
 ;; Created: 25 Jul 1992
 
 ;; 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
@@ -21,9 +21,7 @@
 ;; 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., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
   :type 'file
   :group 'dunnet)
 
-(if nil
-    (eval-and-compile (setq byte-compile-warnings nil)))
-
-(eval-when-compile
- (require 'cl))
-
 ;;;; Mode definitions for interactive mode
 
 (define-derived-mode dun-mode text-mode "Dungeon"
   "Function called when return is pressed in interactive mode to parse line."
   (interactive "*p")
   (beginning-of-line)
-  (setq beg (+ (point) 1))
-  (end-of-line)
-  (if (and (not (= beg (point))) (not (< (point) beg))
-          (string= ">" (buffer-substring (- beg 1) beg)))
-      (progn
-       (setq line (downcase (buffer-substring beg (point))))
-       (princ line)
-       (if (eq (dun-vparse dun-ignore dun-verblist line) -1)
-           (dun-mprinc "I don't understand that.\n")))
+  (let ((beg (1+ (point)))
+        line)
+    (end-of-line)
+    (if (and (not (= beg (point))) (not (< (point) beg))
+             (string= ">" (buffer-substring (- beg 1) beg)))
+        (progn
+          (setq line (downcase (buffer-substring beg (point))))
+          (princ line)
+          (if (eq (dun-vparse dun-ignore dun-verblist line) -1)
+              (dun-mprinc "I don't understand that.\n")))
     (goto-char (point-max))
-    (dun-mprinc "\n"))
-    (dun-messages))
+    (dun-mprinc "\n")))
+  (dun-messages))
 
 (defun dun-messages ()
   (if dun-dead
@@ -3364,5 +3357,5 @@ File not found")))
 
 (provide 'dunnet)
 
-;;; arch-tag: 4cc8e47c-d9e1-4ef4-936b-578e7f529558
+;; arch-tag: 4cc8e47c-d9e1-4ef4-936b-578e7f529558
 ;;; dunnet.el ends here