aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1993-12-23 03:36:02 +0000
committerRichard M. Stallman1993-12-23 03:36:02 +0000
commitb8797e1f6ba6cd1f11e8d4fffe252b9e54bda3cc (patch)
tree0dc5f360ded34242f59e9fb833cac33cf3b7df5c /lisp
parentd443f37c8fc048d9a2ef2f9844cd114f32aff246 (diff)
downloademacs-b8797e1f6ba6cd1f11e8d4fffe252b9e54bda3cc.tar.gz
emacs-b8797e1f6ba6cd1f11e8d4fffe252b9e54bda3cc.zip
(make-doctor-variables): Fix some local var names.
(doctor-adverbp): Don't die if doctor-make-string gives a string of length < 2.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/play/doctor.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el
index b6a6a3a9bcc..7d9fc4632b9 100644
--- a/lisp/play/doctor.el
+++ b/lisp/play/doctor.el
@@ -220,13 +220,13 @@ reads the sentence before point, and prints the Doctor's answer."
220 (i don\'t understand \.) 220 (i don\'t understand \.)
221 (($ thlst)) 221 (($ thlst))
222 (($ areyou) ($ afraidof) that \?))) 222 (($ areyou) ($ afraidof) that \?)))
223 (make-local-variable 'feelings) 223 (make-local-variable 'feelings-about)
224 (setq feelings-about 224 (setq feelings-about
225 '((feelings about) 225 '((feelings about)
226 (aprehensions toward) 226 (aprehensions toward)
227 (thoughts on) 227 (thoughts on)
228 (emotions toward))) 228 (emotions toward)))
229 (make-local-variable 'random) 229 (make-local-variable 'random-adjective)
230 (setq random-adjective 230 (setq random-adjective
231 '((vivid) 231 '((vivid)
232 (emotionally stimulating) 232 (emotionally stimulating)
@@ -1183,7 +1183,9 @@ the subject noun, and return the portion of the sentence following it."
1183 (doctor-possessivepronounp x))) 1183 (doctor-possessivepronounp x)))
1184 1184
1185(defun doctor-adverbp (xx) 1185(defun doctor-adverbp (xx)
1186 (string-equal (substring (doctor-make-string xx) -2) "ly")) 1186 (let ((xxstr (doctor-make-string xx)))
1187 (and (>= (length xxstr) 2)
1188 (string-equal (substring (doctor-make-string xx) -2) "ly"))))
1187 1189
1188(defun doctor-articlep (x) 1190(defun doctor-articlep (x)
1189 (memq x '(the a an))) 1191 (memq x '(the a an)))