diff lisp/play/doctor.el @ 5282:1d3c5ef6e8a1

(make-doctor-variables): Fix some local var names. (doctor-adverbp): Don't die if doctor-make-string gives a string of length < 2.
author Richard M. Stallman <rms@gnu.org>
date Thu, 23 Dec 1993 03:36:02 +0000
parents 5f6e6ea4c7af
children cc7cd83ccf3f
line wrap: on
line diff
--- a/lisp/play/doctor.el	Thu Dec 23 03:34:57 1993 +0000
+++ b/lisp/play/doctor.el	Thu Dec 23 03:36:02 1993 +0000
@@ -220,13 +220,13 @@
 	  (i don\'t understand \.)
 	  (($ thlst))
 	  (($ areyou) ($ afraidof) that \?)))
-  (make-local-variable 'feelings)
+  (make-local-variable 'feelings-about)
   (setq feelings-about
 	'((feelings about)
 	  (aprehensions toward)
 	  (thoughts on)
 	  (emotions toward)))
-  (make-local-variable 'random)
+  (make-local-variable 'random-adjective)
   (setq random-adjective
 	'((vivid)
 	  (emotionally stimulating)
@@ -1183,7 +1183,9 @@
       (doctor-possessivepronounp x)))
 
 (defun doctor-adverbp (xx)
-  (string-equal (substring (doctor-make-string xx) -2) "ly"))
+  (let ((xxstr (doctor-make-string xx)))
+    (and (>= (length xxstr) 2)
+	 (string-equal (substring (doctor-make-string xx) -2) "ly"))))
 
 (defun doctor-articlep (x)
   (memq x '(the a an)))