From b8797e1f6ba6cd1f11e8d4fffe252b9e54bda3cc Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 23 Dec 1993 03:36:02 +0000 Subject: [PATCH] (make-doctor-variables): Fix some local var names. (doctor-adverbp): Don't die if doctor-make-string gives a string of length < 2. --- lisp/play/doctor.el | 8 +++++--- 1 file 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." (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 @@ the subject noun, and return the portion of the sentence following it." (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))) -- 2.39.5