Commit b8797e1f authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(make-doctor-variables): Fix some local var names.

(doctor-adverbp): Don't die if doctor-make-string
gives a string of length < 2.
parent d443f37c
......@@ -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
(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)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment