From xemacs-m  Sun Jun 15 16:09:39 1997
Received: from bittersweet.inetarena.com (karlheg@bittersweet.inetarena.com [206.129.216.38])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id QAA26816
	for <xemacs-beta@xemacs.org>; Sun, 15 Jun 1997 16:09:36 -0500 (CDT)
Received: (from karlheg@localhost)
	by bittersweet.inetarena.com (8.8.5/8.8.5) id OAA09187;
	Sun, 15 Jun 1997 14:09:46 -0700
Date: Sun, 15 Jun 1997 14:09:46 -0700
Message-Id: <199706152109.OAA09187@bittersweet.inetarena.com>
From: "Karl M. Hegbloom" <karlheg@inetarena.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: "Karl M. Hegbloom" <karlheg@inetarena.com>
Cc: <xemacs-beta@xemacs.org>
Subject: Re: [patch] games/{NeXTify,conx,decipher,doctor,life,studly}.el
In-Reply-To: <199706152021.NAA08476@bittersweet.inetarena.com>
References: <199706152021.NAA08476@bittersweet.inetarena.com>
X-Mailer: VM 6.32 under 20.3 "Oslo" XEmacs Lucid (beta7)
X-Face: /Q}=yl}1_v7nP)xXo5XjG8+tl@=uVu7o5u6)f]zN?+<hB!K.m9:[|*p34jVN`O;:XZXVSy>/\R>qDt(t8w!-i{(y0"`jFw^uk8inzO9wXabd'CdjUWfC\GHi:6nO*YC89#-qD>Q4r%9!V"<RYJ=7D#$";q=zML5'!=wvXk^$`6FT=5CMofQX)WUKt0p:OKl.mFOXx/D


8<----------------------------------------------------------------->8
*** NeXTify.el.orig	Sun Jun 15 13:17:42 1997
--- NeXTify.el	Sun Jun 15 13:18:39 1997
***************
*** 42,51 ****
  	  nil
  	(if (looking-at "\\<[A-Za-z][a-z][a-z][a-z][^A-Za-z]")
  	    (progn
! 	      (insert (upcase (following-char))) (delete-char 1)
  	      (forward-char 1)
! 	      (insert (upcase (following-char))) (delete-char 1)
! 	      (insert (upcase (following-char))) (delete-char 1)))))))
  
  (define-key text-mode-map " " 'SeLF-insert-command)
  (define-key text-mode-map "," 'SeLF-insert-command)
--- 42,51 ----
  	  nil
  	(if (looking-at "\\<[A-Za-z][a-z][a-z][a-z][^A-Za-z]")
  	    (progn
! 	      (insert (upcase (char-after (point)))) (delete-char 1)
  	      (forward-char 1)
! 	      (insert (upcase (char-after (point)))) (delete-char 1)
! 	      (insert (upcase (char-after (point)))) (delete-char 1)))))))
  
  (define-key text-mode-map " " 'SeLF-insert-command)
  (define-key text-mode-map "," 'SeLF-insert-command)
*** conx.el.orig	Sun Jun 15 13:17:49 1997
--- conx.el	Sun Jun 15 13:18:46 1997
***************
*** 198,210 ****
    (let (p w)
      (while (not (eobp))
        (skip-chars-forward "^A-Za-z0-9'")
!       (while (memq (following-char) '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?\'))
  	;; ignore words beginning with digits
  	(skip-chars-forward "A-Za-z0-9'")
  	(skip-chars-forward "^A-Za-z0-9'"))
        (setq p (point))
        (skip-chars-forward "A-Za-z0-9'")
!       (if (= ?\' (preceding-char)) (forward-char -1))
        (if (eq p (point))
  	  nil
  	(setq w (buffer-substring p (point)))
--- 198,210 ----
    (let (p w)
      (while (not (eobp))
        (skip-chars-forward "^A-Za-z0-9'")
!       (while (memq (char-after (point)) '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?\'))
  	;; ignore words beginning with digits
  	(skip-chars-forward "A-Za-z0-9'")
  	(skip-chars-forward "^A-Za-z0-9'"))
        (setq p (point))
        (skip-chars-forward "A-Za-z0-9'")
!       (if (= ?\' (char-before (point))) (forward-char -1))
        (if (eq p (point))
  	  nil
  	(setq w (buffer-substring p (point)))
***************
*** 213,219 ****
  	  (conx-add-word w)
  	  (setq n (1+ n))
  	  (skip-chars-forward " \t\n\r")
! 	  (if (memq (setq p (following-char)) '(?\, ?\. ?\! ?\? ?\;))
  	      (conx-punx p)))))))
  
  ;;;###autoload
--- 213,219 ----
  	  (conx-add-word w)
  	  (setq n (1+ n))
  	  (skip-chars-forward " \t\n\r")
! 	  (if (memq (setq p (char-after (point))) '(?\, ?\. ?\! ?\? ?\;))
  	      (conx-punx p)))))))
  
  ;;;###autoload
***************
*** 344,350 ****
  				(beginning-of-line)
  				(point))
  			      (point))
!     (if (= (preceding-char) ?\n)
  	(if (= 0 (conx-rand 4))
  	    (insert "\n")
  	  (delete-char -1)
--- 344,350 ----
  				(beginning-of-line)
  				(point))
  			      (point))
!     (if (= (char-before (point)) ?\n)
  	(if (= 0 (conx-rand 4))
  	    (insert "\n")
  	  (delete-char -1)
***************
*** 360,366 ****
    (message "type ^G to stop.")
    (while t
      (goto-char (point-max))
!     (sit-for (if (= (preceding-char) ?\n) 2 0))
      (conx-sentence)))
  
  
--- 360,366 ----
    (message "type ^G to stop.")
    (while t
      (goto-char (point-max))
!     (sit-for (if (= (char-before (point)) ?\n) 2 0))
      (conx-sentence)))
  
  
*** decipher.el.orig	Sun Jun 15 13:17:57 1997
--- decipher.el	Sun Jun 15 13:18:56 1997
***************
*** 319,325 ****
      (save-excursion
        (or (save-excursion
              (beginning-of-line)
!             (let ((first-char (following-char)))
                (cond
                 ((= ?: first-char)
                  t)
--- 319,325 ----
      (save-excursion
        (or (save-excursion
              (beginning-of-line)
!             (let ((first-char (char-after (point))))
                (cond
                 ((= ?: first-char)
                  t)
***************
*** 335,341 ****
                  (error "Bad location")))))
            (let (goal-column)
              (previous-line 1)))
!       (let ((char-a (following-char))
              (char-b (decipher-last-command-char)))
          (or (and (not (= ?w (char-syntax char-a)))
                   (= char-b ?\ )) ;Spacebar just advances on non-letters
--- 335,341 ----
                  (error "Bad location")))))
            (let (goal-column)
              (previous-line 1)))
!       (let ((char-a (char-after (point)))
              (char-b (decipher-last-command-char)))
          (or (and (not (= ?w (char-syntax char-a)))
                   (= char-b ?\ )) ;Spacebar just advances on non-letters
***************
*** 477,484 ****
    (let ((col (1- (current-column))))
      (save-excursion
        (forward-line)
!       (or (= ?\> (following-char))
!           (= ?\) (following-char))
            (error "Bad location"))
        (move-to-column col t)
        (or (eolp)
--- 477,484 ----
    (let ((col (1- (current-column))))
      (save-excursion
        (forward-line)
!       (or (= ?\> (char-after (point)))
!           (= ?\) (char-after (point)))
            (error "Bad location"))
        (move-to-column col t)
        (or (eolp)
***************
*** 625,631 ****
      (let ((plain-char ?z))
        (while (>= plain-char ?a)
          (backward-char)
!         (push (cons plain-char (following-char)) decipher-alphabet)
          (decf plain-char)))))
  
  ;;;===================================================================
--- 625,631 ----
      (let ((plain-char ?z))
        (while (>= plain-char ?a)
          (backward-char)
!         (push (cons plain-char (char-after (point))) decipher-alphabet)
          (decf plain-char)))))
  
  ;;;===================================================================
***************
*** 657,663 ****
  different letters, after 7 differerent 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-analyze)
    (let (start end)
      (save-excursion
--- 657,663 ----
  different letters, after 7 differerent letters, and is next to a total
  of 11 different letters.  It occurs 14 times, making up 9% of the
  ciphertext."
!   (interactive (list (upcase (char-after (point)))))
    (decipher-analyze)
    (let (start end)
      (save-excursion
***************
*** 741,747 ****
        (funcall func)              ;Space marks beginning of first word
        (while (search-forward-regexp "^:" nil t)
          (while (not (eolp))
!           (setq decipher-char (upcase (following-char)))
            (or (and (>= decipher-char ?A) (<= decipher-char ?Z))
                (setq decipher-char ?\ ))
            (or (and (equal decipher-char ?\ )
--- 741,747 ----
        (funcall func)              ;Space marks beginning of first word
        (while (search-forward-regexp "^:" nil t)
          (while (not (eolp))
!           (setq decipher-char (upcase (char-after (point))))
            (or (and (>= decipher-char ?A) (<= decipher-char ?Z))
                (setq decipher-char ?\ ))
            (or (and (equal decipher-char ?\ )
***************
*** 769,775 ****
        (goto-char (point-min))
        (while (search-forward-regexp "^:" nil t)
          (while (not (eolp))
!           (setq decipher-char (upcase (following-char)))
            (and (>= decipher-char ?A)
                 (<= decipher-char ?Z)
                 (funcall func))
--- 769,775 ----
        (goto-char (point-min))
        (while (search-forward-regexp "^:" nil t)
          (while (not (eolp))
!           (setq decipher-char (upcase (char-after (point))))
            (and (>= decipher-char ?A)
                 (<= decipher-char ?Z)
                 (funcall func))
*** doctor.el.orig	Sun Jun 15 13:19:08 1997
--- doctor.el	Sun Jun 15 14:09:00 1997
***************
*** 859,865 ****
    "Insert a newline if preceding character is not a newline.
  Otherwise call the Doctor to parse preceding sentence."
    (interactive "*p")
!   (if (= (preceding-char) ?\n)
        (doctor-read-print)
      (newline arg)))
  
--- 859,865 ----
    "Insert a newline if preceding character is not a newline.
  Otherwise call the Doctor to parse preceding sentence."
    (interactive "*p")
!   (if (= (char-before (point)) ?\n)
        (doctor-read-print)
      (newline arg)))
  
*** life.el.orig	Sun Jun 15 13:18:21 1997
--- life.el	Sun Jun 15 13:19:58 1997
***************
*** 232,239 ****
      (while (not (eobp))
        ;; check for life at beginning or end of line.  If found at
        ;; either end, expand at both ends,
!       (cond ((or (eq (following-char) (life-life-char))
! 		 (eq (progn (end-of-line) (preceding-char)) (life-life-char)))
  	     (goto-char (point-min))
  	     (while (not (eobp))
  	       (insert (life-void-char))
--- 232,239 ----
      (while (not (eobp))
        ;; check for life at beginning or end of line.  If found at
        ;; either end, expand at both ends,
!       (cond ((or (eq (char-after (point)) (life-life-char))
! 		 (eq (progn (end-of-line) (char-before (point))) (life-life-char)))
  	     (goto-char (point-min))
  	     (while (not (eobp))
  	       (insert (life-void-char))
*** studly.el.orig	Sun Jun 15 13:18:29 1997
--- studly.el	Sun Jun 15 13:20:26 1997
***************
*** 49,62 ****
  	    c)
  	(goto-char begin)
  	(while (< (point) word-end)
! 	  (setq offset (+ offset (following-char)))
  	  (forward-char 1))
! 	(setq offset (+ offset (following-char)))
  	(goto-char begin)
  	(while (< (point) word-end)
! 	  (setq c (following-char))
  	  (if (and (= (% (+ c offset) 4) 2)
! 		   (let ((ch (following-char)))
  		     (or (and (>= ch ?a) (<= ch ?z))
  			 (and (>= ch ?A) (<= ch ?Z)))))
  	      (progn
--- 49,62 ----
  	    c)
  	(goto-char begin)
  	(while (< (point) word-end)
! 	  (setq offset (+ offset (char-after (point))))
  	  (forward-char 1))
! 	(setq offset (+ offset (char-after (point))))
  	(goto-char begin)
  	(while (< (point) word-end)
! 	  (setq c (char-after (point)))
  	  (if (and (= (% (+ c offset) 4) 2)
! 		   (let ((ch (char-after (point))))
  		     (or (and (>= ch ?a) (<= ch ?z))
  			 (and (>= ch ?A) (<= ch ?Z)))))
  	      (progn
8<----------------------------------------------------------------->8

-- 
Karl M. Hegbloom <karlheg@inetarena.com>
http://www.inetarena.com/~karlheg
Portland, OR  USA
Debian GNU 1.3  Linux 2.1.36 AMD K5 PR-133

